diff --git a/Cargo.toml b/Cargo.toml index 3530f96..7eea5c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/src/sed/fast_io.rs b/src/sed/fast_io.rs index d7a987d..5d249e4 100644 --- a/src/sed/fast_io.rs +++ b/src/sed/fast_io.rs @@ -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);