mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 00:08:01 +00:00
Gain back 10MB/s on the json deserialization benchmark
This commit is contained in:
@@ -54,8 +54,14 @@ impl<Iter> Deserializer<Iter>
|
||||
match self.ch {
|
||||
Some(ch) => Ok(Some(ch)),
|
||||
None => {
|
||||
self.ch = try!(self.next_char());
|
||||
Ok(self.ch)
|
||||
match self.rdr.next() {
|
||||
Some(Err(err)) => Err(Error::IoError(err)),
|
||||
Some(Ok(ch)) => {
|
||||
self.ch = Some(ch);
|
||||
Ok(self.ch)
|
||||
}
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user