From a993630cf961e2c432ca2fcd139313d648b1e8e8 Mon Sep 17 00:00:00 2001 From: Elliott Slaughter Date: Mon, 27 Feb 2017 14:00:21 -0800 Subject: [PATCH] Fix documentation of serialize_tuple and SerializeTuple. --- serde/src/ser/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index 38f9ec7b..90eed5cd 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -466,13 +466,13 @@ pub trait Serializer: Sized { fn serialize_seq_fixed_size(self, size: usize) -> Result; /// Begin to serialize a tuple. This call must be followed by zero or more - /// calls to `serialize_field`, then a call to `end`. + /// calls to `serialize_element`, then a call to `end`. /// /// ```rust,ignore /// let mut tup = serializer.serialize_tuple(3)?; - /// tup.serialize_field(&self.0)?; - /// tup.serialize_field(&self.1)?; - /// tup.serialize_field(&self.2)?; + /// tup.serialize_element(&self.0)?; + /// tup.serialize_element(&self.1)?; + /// tup.serialize_element(&self.2)?; /// tup.end() /// ``` fn serialize_tuple(self, len: usize) -> Result; @@ -646,9 +646,9 @@ pub trait SerializeSeq { /// /// ```rust,ignore /// let mut tup = serializer.serialize_tuple(3)?; -/// tup.serialize_field(&self.0)?; -/// tup.serialize_field(&self.1)?; -/// tup.serialize_field(&self.2)?; +/// tup.serialize_element(&self.0)?; +/// tup.serialize_element(&self.1)?; +/// tup.serialize_element(&self.2)?; /// tup.end() /// ``` pub trait SerializeTuple {