diff options
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r-- | src/tokenizer.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 6384544..2580144 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -312,7 +312,7 @@ where fn next(&mut self) -> Option<Self::Item> { loop { if let Some(token) = self.emitter.pop_token() { - break Some(Ok(token)); + return Some(Ok(token)); } else if !self.eof { match machine::consume(self) { Ok(ControlToken::Continue) => (), @@ -320,10 +320,10 @@ where self.eof = true; self.emitter.emit_eof(); } - Err(e) => break Some(Err(e)), + Err(e) => return Some(Err(e)), } } else { - break None; + return None; } } } |