diff options
author | Martin Fischer <martin@push-f.com> | 2023-09-27 17:19:27 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-27 17:19:27 +0200 |
commit | 518edf281f93cceb9793224f700a8f3d63d78ea2 (patch) | |
tree | c6c0adfe88da9f329ac9c80f8c1e97607c749742 /src/tokenizer.rs | |
parent | 67a812003a18cca016ff8b918610b4b6276ffd86 (diff) |
break!: remove Emitter::pop_token, use Iterator instead
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 a37a832..f4c0c48 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -373,13 +373,13 @@ impl<O, R, E> Iterator for Tokenizer<R, O, E> where O: Offset, R: Reader + Position<O>, - E: Emitter<O>, + E: Emitter<O> + Iterator, { - type Item = Result<Event<E::Token>, R::Error>; + type Item = Result<Event<E::Item>, R::Error>; fn next(&mut self) -> Option<Self::Item> { loop { - if let Some(token) = self.emitter.pop_token() { + if let Some(token) = self.emitter.next() { return Some(Ok(Event::Token(token))); } |