From 6ad7a434a7efe4ce90d9857981591493ff03206f Mon Sep 17 00:00:00 2001 From: gabriel Date: Tue, 14 May 2024 18:16:57 +0800 Subject: [PATCH] clippy --- crates/nu-parser/src/lex.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/nu-parser/src/lex.rs b/crates/nu-parser/src/lex.rs index f6b70b922c..9560c5aec5 100644 --- a/crates/nu-parser/src/lex.rs +++ b/crates/nu-parser/src/lex.rs @@ -167,10 +167,11 @@ pub fn lex_item( *curr_offset += 1; break; } else if (c == b'\'' || c == b'"' || c == b'`') && quote_start.is_none() { - if *curr_offset > 0 && input.get(*curr_offset - 1) == Some(&b'$') { - if c == b'\'' || c == b'"' { - string_interpolation = true; - } + if *curr_offset > 0 + && input.get(*curr_offset - 1) == Some(&b'$') + && (c == b'\'' || c == b'"') + { + string_interpolation = true; } // We encountered the opening quote of a string literal. quote_start = Some(c);