mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Merge pull request #1131 from JDemler/master
No warning when file is opened with read truncate and write
This commit is contained in:
commit
514f77be12
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ fn check_open_options(cx: &LateContext, options: &[(OpenOption, Argument)], span
|
|||
}
|
||||
}
|
||||
|
||||
if read && truncate && read_arg && truncate_arg {
|
||||
if read && truncate && read_arg && truncate_arg && !(write && write_arg) {
|
||||
span_lint(cx, NONSENSICAL_OPEN_OPTIONS, span, "file opened with \"truncate\" and \"read\"");
|
||||
}
|
||||
if append && truncate && append_arg && truncate_arg {
|
||||
|
|
Loading…
Reference in a new issue