mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-31 07:39:49 +00:00
Merge pull request #664 from serde-rs/visitor-value
Remove the Deserialize trait bound on Visitor::Value
This commit is contained in:
commit
fbd4a17467
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -412,7 +412,7 @@ pub trait Deserializer {
|
|||||||
/// This trait represents a visitor that walks through a deserializer.
|
/// This trait represents a visitor that walks through a deserializer.
|
||||||
pub trait Visitor {
|
pub trait Visitor {
|
||||||
/// The value produced by this visitor.
|
/// The value produced by this visitor.
|
||||||
type Value: Deserialize;
|
type Value;
|
||||||
|
|
||||||
/// `visit_bool` deserializes a `bool` into a `Value`.
|
/// `visit_bool` deserializes a `bool` into a `Value`.
|
||||||
fn visit_bool<E>(&mut self, v: bool) -> Result<Self::Value, E>
|
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(_) => {
|
Some(_) => {
|
||||||
Deserialize::deserialize(self.de)
|
de::Deserializer::deserialize(self.de, visitor)
|
||||||
}
|
}
|
||||||
None => Err(Error::EndOfStream),
|
None => Err(Error::EndOfStream),
|
||||||
}
|
}
|
||||||
@@ -887,7 +887,7 @@ impl<'a, I> VariantVisitor for DeserializerVariantVisitor<'a, I>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
Deserialize::deserialize(self.de)
|
de::Deserializer::deserialize(self.de, visitor)
|
||||||
}
|
}
|
||||||
None => Err(Error::EndOfStream),
|
None => Err(Error::EndOfStream),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user