We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 18f20ee + 73ce9fa commit f226010Copy full SHA for f226010
1 file changed
src/stream/mod.rs
@@ -384,9 +384,9 @@ impl<'i> Stream for &'i str {
384
385
#[inline(always)]
386
fn next_token(&mut self) -> Option<Self::Token> {
387
- let c = self.chars().next()?;
388
- let offset = c.len();
389
- *self = &self[offset..];
+ let mut iter = self.chars();
+ let c = iter.next()?;
+ *self = iter.as_str();
390
Some(c)
391
}
392
0 commit comments