aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tokenizer.rs')
-rw-r--r--src/tokenizer.rs6
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)));
}