Simplify some IntoDeserializer deserializer types

This commit is contained in:
David Tolnay 2017-10-20 21:38:18 -07:00
parent 30606a43aa
commit 14ed6f2dab
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -733,7 +733,7 @@ where
T: IntoDeserializer<'de, E>, T: IntoDeserializer<'de, E>,
E: de::Error, E: de::Error,
{ {
type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>; type Deserializer = SeqDeserializer<<Self as IntoIterator>::IntoIter, E>;
fn into_deserializer(self) -> Self::Deserializer { fn into_deserializer(self) -> Self::Deserializer {
SeqDeserializer::new(self.into_iter()) SeqDeserializer::new(self.into_iter())
@ -746,7 +746,7 @@ where
T: IntoDeserializer<'de, E> + Eq + Ord, T: IntoDeserializer<'de, E> + Eq + Ord,
E: de::Error, E: de::Error,
{ {
type Deserializer = SeqDeserializer<<BTreeSet<T> as IntoIterator>::IntoIter, E>; type Deserializer = SeqDeserializer<<Self as IntoIterator>::IntoIter, E>;
fn into_deserializer(self) -> Self::Deserializer { fn into_deserializer(self) -> Self::Deserializer {
SeqDeserializer::new(self.into_iter()) SeqDeserializer::new(self.into_iter())
@ -760,7 +760,7 @@ where
S: BuildHasher, S: BuildHasher,
E: de::Error, E: de::Error,
{ {
type Deserializer = SeqDeserializer<<HashSet<T, S> as IntoIterator>::IntoIter, E>; type Deserializer = SeqDeserializer<<Self as IntoIterator>::IntoIter, E>;
fn into_deserializer(self) -> Self::Deserializer { fn into_deserializer(self) -> Self::Deserializer {
SeqDeserializer::new(self.into_iter()) SeqDeserializer::new(self.into_iter())
@ -1153,7 +1153,7 @@ where
V: IntoDeserializer<'de, E>, V: IntoDeserializer<'de, E>,
E: de::Error, E: de::Error,
{ {
type Deserializer = MapDeserializer<'de, <BTreeMap<K, V> as IntoIterator>::IntoIter, E>; type Deserializer = MapDeserializer<'de, <Self as IntoIterator>::IntoIter, E>;
fn into_deserializer(self) -> Self::Deserializer { fn into_deserializer(self) -> Self::Deserializer {
MapDeserializer::new(self.into_iter()) MapDeserializer::new(self.into_iter())
@ -1168,7 +1168,7 @@ where
S: BuildHasher, S: BuildHasher,
E: de::Error, E: de::Error,
{ {
type Deserializer = MapDeserializer<'de, <HashMap<K, V, S> as IntoIterator>::IntoIter, E>; type Deserializer = MapDeserializer<'de, <Self as IntoIterator>::IntoIter, E>;
fn into_deserializer(self) -> Self::Deserializer { fn into_deserializer(self) -> Self::Deserializer {
MapDeserializer::new(self.into_iter()) MapDeserializer::new(self.into_iter())