mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 04:48:01 +00:00
Fix tests, make Deserializer::visit take a value not a reference
This commit is contained in:
@@ -83,7 +83,7 @@ impl<Iter: Iterator<Item=u8>> Deserializer<Iter> {
|
||||
#[inline]
|
||||
fn parse_value<
|
||||
V: de::Visitor,
|
||||
>(&mut self, visitor: &mut V) -> Result<V::Value, Error> {
|
||||
>(&mut self, mut visitor: V) -> Result<V::Value, Error> {
|
||||
self.parse_whitespace();
|
||||
|
||||
if self.eof() {
|
||||
@@ -142,7 +142,7 @@ impl<Iter: Iterator<Item=u8>> Deserializer<Iter> {
|
||||
#[inline]
|
||||
fn parse_number<
|
||||
V: de::Visitor,
|
||||
>(&mut self, visitor: &mut V) -> Result<V::Value, Error> {
|
||||
>(&mut self, mut visitor: V) -> Result<V::Value, Error> {
|
||||
let mut neg = 1;
|
||||
|
||||
if self.ch_is(b'-') {
|
||||
@@ -389,7 +389,7 @@ impl<Iter: Iterator<Item=u8>> de::Deserializer for Deserializer<Iter> {
|
||||
#[inline]
|
||||
fn visit<
|
||||
V: de::Visitor,
|
||||
>(&mut self, visitor: &mut V) -> Result<V::Value, Error> {
|
||||
>(&mut self, visitor: V) -> Result<V::Value, Error> {
|
||||
self.parse_value(visitor)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user