diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-28 13:11:58 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-03 23:00:05 +0200 |
commit | 1818a84b01b10d43429e352e8a4fb85c03855bec (patch) | |
tree | 228e88106cca829679eca21bf151ed6d80c625ea /src | |
parent | f2ff370d7b9920c89bcc50cf35b7cd5bc4d2c777 (diff) |
chore: use `return` instead of `break`
Diffstat (limited to 'src')
-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; } } } |