Enable clippy::unnecessary_unwrap lint

This commit is contained in:
Johannes Altmanninger 2024-01-13 02:14:07 +01:00
parent fd7f76c180
commit a707cd09c4
4 changed files with 1 additions and 3 deletions

View file

@ -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"

View file

@ -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,

View file

@ -561,6 +561,7 @@ impl Parser {
// 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(),

View file

@ -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,