Merge pull request #664 from serde-rs/visitor-value
Remove the Deserialize trait bound on Visitor::Value
This commit is contained in:
commit
fbd4a17467
@ -412,7 +412,7 @@ pub trait Deserializer {
|
||||
/// This trait represents a visitor that walks through a deserializer.
|
||||
pub trait Visitor {
|
||||
/// The value produced by this visitor.
|
||||
type Value: Deserialize;
|
||||
type Value;
|
||||
|
||||
/// `visit_bool` deserializes a `bool` into a `Value`.
|
||||
fn visit_bool<E>(&mut self, v: bool) -> Result<Self::Value, E>
|
||||
|
@ -856,7 +856,7 @@ impl<'a, I> VariantVisitor for DeserializerVariantVisitor<'a, I>
|
||||
}
|
||||
}
|
||||
Some(_) => {
|
||||
Deserialize::deserialize(self.de)
|
||||
de::Deserializer::deserialize(self.de, visitor)
|
||||
}
|
||||
None => Err(Error::EndOfStream),
|
||||
}
|
||||
@ -887,7 +887,7 @@ impl<'a, I> VariantVisitor for DeserializerVariantVisitor<'a, I>
|
||||
}
|
||||
}
|
||||
Some(_) => {
|
||||
Deserialize::deserialize(self.de)
|
||||
de::Deserializer::deserialize(self.de, visitor)
|
||||
}
|
||||
None => Err(Error::EndOfStream),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user