Clean up end of next()

This commit is contained in:
Eryn Wells 2016-12-25 14:41:06 -07:00
parent 953870fae0
commit ea4758e442

View file

@ -167,11 +167,10 @@ impl Iterator for Lexer {
}
}
self.advance_begin();
let mut lex: Option<Lex> = None;
if let Some(token) = token {
lex = Some(Lex::new(token));
match token {
Some(t) => Some(Lex::new(t)),
None => None,
}
lex
}
}