From 1296100d31215bccebe2091bf3d4aafcc3045895 Mon Sep 17 00:00:00 2001 From: JT Date: Sun, 24 Oct 2021 12:40:27 +1300 Subject: [PATCH] Clippy fixes --- crates/nu-parser/src/parse_keywords.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/nu-parser/src/parse_keywords.rs b/crates/nu-parser/src/parse_keywords.rs index 7f405714dd..b086ed223f 100644 --- a/crates/nu-parser/src/parse_keywords.rs +++ b/crates/nu-parser/src/parse_keywords.rs @@ -71,7 +71,7 @@ pub fn parse_def( named: vec![], }); - let call = if let Some(name_span) = spans.get(1) { + if let Some(name_span) = spans.get(1) { let (name_expr, err) = parse_string(working_set, *name_span); error = error.or(err); @@ -142,8 +142,6 @@ pub fn parse_def( )) }); } - - call } else { let err_span = Span { start: name_span.end, @@ -152,8 +150,6 @@ pub fn parse_def( error = error .or_else(|| Some(ParseError::MissingPositional("parameters".into(), err_span))); - - call } } else { let err_span = Span { @@ -167,9 +163,7 @@ pub fn parse_def( err_span, )) }); - - call - }; + } ( Statement::Pipeline(Pipeline::from_vec(vec![Expression {