diff --git a/Cargo.toml b/Cargo.toml index bcf658ade..baf9e18f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,4 +95,3 @@ clippy.ptr_arg = "allow" clippy.redundant_slicing = "allow" clippy.too_many_arguments = "allow" clippy.uninlined_format_args = "allow" -clippy.unnecessary_unwrap = "allow" diff --git a/fish-rust/src/lib.rs b/fish-rust/src/lib.rs index 6bee81616..03d09ab0c 100644 --- a/fish-rust/src/lib.rs +++ b/fish-rust/src/lib.rs @@ -21,7 +21,6 @@ #![allow(clippy::redundant_slicing)] #![allow(clippy::too_many_arguments)] #![allow(clippy::uninlined_format_args)] -#![allow(clippy::unnecessary_unwrap)] pub const BUILD_VERSION: &str = match option_env!("FISH_BUILD_VERSION") { Some(v) => v, diff --git a/fish-rust/src/parser.rs b/fish-rust/src/parser.rs index 72a490a2d..f0512b32a 100644 --- a/fish-rust/src/parser.rs +++ b/fish-rust/src/parser.rs @@ -561,6 +561,7 @@ pub fn eval_node( // Outermost node. std::mem::replace(&mut self.execution_context.borrow_mut(), new_value) } else { + #[allow(clippy::unnecessary_unwrap)] Some(ParseExecutionContext::swap( self.execution_context.borrow().as_ref().unwrap(), new_value.unwrap(), diff --git a/fish-rust/src/wildcard.rs b/fish-rust/src/wildcard.rs index 5edae8489..7ee6b4acb 100644 --- a/fish-rust/src/wildcard.rs +++ b/fish-rust/src/wildcard.rs @@ -94,7 +94,6 @@ fn has_prefix_match(comps: &CompletionReceiver, first: usize) -> bool { /// We ignore ANY_STRING_RECURSIVE here. The consequence is that you cannot tab complete ** /// wildcards. This is historic behavior. /// is_first_call is default false. -#[allow(clippy::unnecessary_unwrap)] fn wildcard_complete_internal( s: &wstr, wc: &wstr,