diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index af18eaef..cb0e25e8 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -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(&mut self, visitor: V) -> Result + fn deserialize_struct_field(&mut self, visitor: V) -> Result where V: Visitor, { self.deserialize(visitor) diff --git a/serde_codegen/src/de.rs b/serde_codegen/src/de.rs index eb5aa700..107f8872 100644 --- a/serde_codegen/src/de.rs +++ b/serde_codegen/src/de.rs @@ -949,7 +949,7 @@ fn deserialize_field_visitor( } } - deserializer.deserialize_struct_key(__FieldVisitor::{ phantom: PhantomData }) + deserializer.deserialize_struct_field(__FieldVisitor::{ phantom: PhantomData }) } } ).unwrap();