add size hints: 167ns vs 290ns

This commit is contained in:
Erick Tryzelaar
2014-05-19 08:11:23 -07:00
parent db242fed53
commit 6d13ee2ec8
2 changed files with 25 additions and 24 deletions
+2 -2
View File
@@ -1172,9 +1172,9 @@ impl<T: Iterator<char>> Iterator<Result<de::Token, ParserError>> for Parser<T> {
}
match self.parse() {
ObjectStart => Some(Ok(de::CollectionStart)),
ObjectStart => Some(Ok(de::CollectionStart(0))),
ObjectEnd => Some(Ok(de::CollectionEnd)),
ListStart => Some(Ok(de::CollectionStart)),
ListStart => Some(Ok(de::CollectionStart(0))),
ListEnd => Some(Ok(de::CollectionEnd)),
NullValue => Some(Ok(de::Null)),
BooleanValue(value) => Some(Ok(de::Bool(value))),