Remove the Deserialize trait bound on Visitor::Value

This commit is contained in:
David Tolnay
2017-01-03 01:50:10 -08:00
parent a3f556959f
commit 7a0e8f73b4
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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>
+2 -2
View File
@@ -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),
}