clippy: fix manual_let_else lint

This commit is contained in:
xtqqczze
2026-02-16 16:30:29 +00:00
committed by Sylvestre Ledru
parent 6b6067075b
commit 8772c166d9
2 changed files with 2 additions and 4 deletions
-1
View File
@@ -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
View File
@@ -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);