From 8756d3e7512c1416cc15a688c62b8f51f030b192 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Fri, 17 May 2024 16:20:26 -0600 Subject: Remove into_iter() for Chars in new next() function The instance of &mut Chars is already an iterator, so we can remove the call to into_iter(). --- src/poem/read/parse.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/poem/read/parse.rs b/src/poem/read/parse.rs index 0dbdf0f..27c4728 100644 --- a/src/poem/read/parse.rs +++ b/src/poem/read/parse.rs @@ -30,7 +30,7 @@ pub fn next(chars: &mut Chars, i: &mut usize, otherwise: Rune, ahead: Vec<(char, // Check if that next character matches any characters in ahead for (c, rune) in ahead.iter() { if next == *c { - chars.into_iter().next(); + chars.next(); *i += 1; return *rune; } -- cgit v1.2.3