From 9c98783917ab43a6707d09b18ceb64bb71fce995 Mon Sep 17 00:00:00 2001 From: Fernando Herrera Date: Sat, 11 Sep 2021 13:16:40 +0100 Subject: [PATCH] clippy correcgtions --- crates/nu-cli/src/errors.rs | 2 +- crates/nu-parser/src/parser.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-cli/src/errors.rs b/crates/nu-cli/src/errors.rs index 1c25e5d2e4..b5470ead13 100644 --- a/crates/nu-cli/src/errors.rs +++ b/crates/nu-cli/src/errors.rs @@ -209,7 +209,7 @@ pub fn report_parsing_error( Diagnostic::error() .with_message("Unknown state") .with_labels(vec![ - Label::primary(diag_file_id, diag_range).with_message(format!("{}", name)) + Label::primary(diag_file_id, diag_range).with_message(name.to_string()) ]) } ParseError::NonUtf8(span) => { diff --git a/crates/nu-parser/src/parser.rs b/crates/nu-parser/src/parser.rs index 16ee5aca75..5c03e08ddb 100644 --- a/crates/nu-parser/src/parser.rs +++ b/crates/nu-parser/src/parser.rs @@ -606,7 +606,7 @@ pub fn parse_call( if spans.len() > 1 { let test_equal = working_set.get_span_contents(spans[1]); - if test_equal == &[b'='] { + if test_equal == [b'='] { return ( garbage(Span::new(0, 0)), Some(ParseError::UnknownState(