diff options
author | Rory Dudley | 2024-05-17 16:20:26 -0600 |
---|---|---|
committer | Rory Dudley | 2024-05-17 16:20:26 -0600 |
commit | 8756d3e7512c1416cc15a688c62b8f51f030b192 (patch) | |
tree | e37729583a78feb13259e8a6cb30ad1c54213a14 /src/poem/read | |
parent | 40a403c412be52b713a7363840bfa3f507985a9f (diff) | |
download | dwarvish-8756d3e7512c1416cc15a688c62b8f51f030b192.tar.gz |
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().
Diffstat (limited to 'src/poem/read')
-rw-r--r-- | src/poem/read/parse.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |