From 3718afefee61634798b2a28eb32e39b217e119dd Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Fri, 21 Jun 2024 08:58:05 +0800 Subject: [PATCH] fix clippy --- crates/nu-parser/src/parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/nu-parser/src/parser.rs b/crates/nu-parser/src/parser.rs index 40c194d28f..4423c6878d 100644 --- a/crates/nu-parser/src/parser.rs +++ b/crates/nu-parser/src/parser.rs @@ -2834,10 +2834,10 @@ pub fn parse_string(working_set: &mut StateWorkingSet, span: Span) -> Expression // Check for unbalanced quotes: { if bytes.starts_with(b"\"") - && (bytes.into_iter().filter(|ch| **ch == b'"').count() > 1 && !bytes.ends_with(b"\"")) + && (bytes.iter().filter(|ch| **ch == b'"').count() > 1 && !bytes.ends_with(b"\"")) { let close_delimiter_index = bytes - .into_iter() + .iter() .skip(1) .position(|ch| *ch == b'"') .expect("Already check input bytes contains at least two double quotes"); @@ -2848,10 +2848,10 @@ pub fn parse_string(working_set: &mut StateWorkingSet, span: Span) -> Expression } if bytes.starts_with(b"\'") - && (bytes.into_iter().filter(|ch| **ch == b'\'').count() > 1 && !bytes.ends_with(b"\'")) + && (bytes.iter().filter(|ch| **ch == b'\'').count() > 1 && !bytes.ends_with(b"\'")) { let close_delimiter_index = bytes - .into_iter() + .iter() .skip(1) .position(|ch| *ch == b'\'') .expect("Already check input bytes contains at least two double quotes");