feat(de): Rename deserialize_struct_key to deserialize_struct_field

This makes it more consistent with the naming style used throughout
the rest of serde.
This commit is contained in:
Erick Tryzelaar 2016-02-05 07:48:20 -08:00
parent 9dffbcfedb
commit f8b3990571
2 changed files with 5 additions and 5 deletions

View File

@ -406,11 +406,11 @@ pub trait Deserializer {
self.deserialize_seq(visitor)
}
/// This method hints that the `Deserialize` type is expecting some sort of struct key mapping.
/// This allows deserializers to choose between &str, usize, or &[u8] to properly deserialize a
/// struct key.
/// This method hints that the `Deserialize` type is expecting some sort of struct field
/// mapping. This allows deserializers to choose between &str, usize, or &[u8] to properly
/// deserialize a struct field.
#[inline]
fn deserialize_struct_key<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>
fn deserialize_struct_field<V>(&mut self, visitor: V) -> Result<V::Value, Self::Error>
where V: Visitor,
{
self.deserialize(visitor)

View File

@ -949,7 +949,7 @@ fn deserialize_field_visitor(
}
}
deserializer.deserialize_struct_key(__FieldVisitor::<D>{ phantom: PhantomData })
deserializer.deserialize_struct_field(__FieldVisitor::<D>{ phantom: PhantomData })
}
}
).unwrap();