mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 19:51:01 +00:00
Use V as the Visitor parameter
This commit is contained in:
+10
-10
@@ -693,7 +693,7 @@ where
|
|||||||
Second<I::Item>: IntoDeserializer<'de, E>,
|
Second<I::Item>: IntoDeserializer<'de, E>,
|
||||||
E: de::Error,
|
E: de::Error,
|
||||||
{
|
{
|
||||||
/// Construct a new `MapDeserializer<I, K, V, E>`.
|
/// Construct a new `MapDeserializer<I, E>`.
|
||||||
pub fn new(iter: I) -> Self {
|
pub fn new(iter: I) -> Self {
|
||||||
MapDeserializer {
|
MapDeserializer {
|
||||||
iter: iter.fuse(),
|
iter: iter.fuse(),
|
||||||
@@ -741,30 +741,30 @@ where
|
|||||||
{
|
{
|
||||||
type Error = E;
|
type Error = E;
|
||||||
|
|
||||||
fn deserialize_any<V_>(mut self, visitor: V_) -> Result<V_::Value, Self::Error>
|
fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
|
||||||
where
|
where
|
||||||
V_: de::Visitor<'de>,
|
V: de::Visitor<'de>,
|
||||||
{
|
{
|
||||||
let value = try!(visitor.visit_map(&mut self));
|
let value = try!(visitor.visit_map(&mut self));
|
||||||
try!(self.end());
|
try!(self.end());
|
||||||
Ok(value)
|
Ok(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_seq<V_>(mut self, visitor: V_) -> Result<V_::Value, Self::Error>
|
fn deserialize_seq<V>(mut self, visitor: V) -> Result<V::Value, Self::Error>
|
||||||
where
|
where
|
||||||
V_: de::Visitor<'de>,
|
V: de::Visitor<'de>,
|
||||||
{
|
{
|
||||||
let value = try!(visitor.visit_seq(&mut self));
|
let value = try!(visitor.visit_seq(&mut self));
|
||||||
try!(self.end());
|
try!(self.end());
|
||||||
Ok(value)
|
Ok(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_seq_fixed_size<V_>(self,
|
fn deserialize_seq_fixed_size<V>(self,
|
||||||
_len: usize,
|
_len: usize,
|
||||||
visitor: V_)
|
visitor: V)
|
||||||
-> Result<V_::Value, Self::Error>
|
-> Result<V::Value, Self::Error>
|
||||||
where
|
where
|
||||||
V_: de::Visitor<'de>,
|
V: de::Visitor<'de>,
|
||||||
{
|
{
|
||||||
self.deserialize_seq(visitor)
|
self.deserialize_seq(visitor)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user