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(