mirror of
https://github.com/uutils/sed.git
synced 2026-06-10 16:14:15 -07:00
clippy: fix manual_let_else lint
This commit is contained in:
committed by
Sylvestre Ledru
parent
6b6067075b
commit
8772c166d9
@@ -152,7 +152,6 @@ used_underscore_binding = "allow" # 2
|
||||
too_many_lines = "allow" # 2
|
||||
struct_excessive_bools = "allow" # 2
|
||||
match_same_arms = "allow" # 2
|
||||
manual_let_else = "allow" # 2
|
||||
manual_assert = "allow" # 2
|
||||
ignore_without_reason = "allow" # 2
|
||||
format_push_string = "allow" # 2
|
||||
|
||||
+2
-3
@@ -630,10 +630,9 @@ impl OutputBuffer {
|
||||
self.flush_mmap(WriteRange::Complete)?;
|
||||
}
|
||||
|
||||
let file = match File::open(path) {
|
||||
Ok(f) => f,
|
||||
let Ok(file) = File::open(path) else {
|
||||
// Per POSIX, if the file can't be read treat it as empty.
|
||||
Err(_) => return Ok(()),
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let mut reader = BufReader::new(file);
|
||||
|
||||
Reference in New Issue
Block a user