mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Enable clippy::unnecessary_unwrap lint
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -561,6 +561,7 @@ pub fn eval_node<T: 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(),
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user