Naming for &str and &[u8] is more like primitives

This commit is contained in:
David Tolnay 2017-04-19 14:53:15 -07:00
parent a369ee156f
commit b9b7922ef1
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -678,7 +678,7 @@ pub trait Serializer: Sized {
/// #
/// # fn main() {}
/// ```
fn serialize_str(self, value: &str) -> Result<Self::Ok, Self::Error>;
fn serialize_str(self, v: &str) -> Result<Self::Ok, Self::Error>;
/// Serialize a chunk of raw byte data.
///
@ -701,7 +701,7 @@ pub trait Serializer: Sized {
/// # type Ok = ();
/// # type Error = Error;
/// #
/// fn serialize_bytes(self, value: &[u8]) -> Result<Self::Ok, Self::Error> {
/// fn serialize_bytes(self, v: &[u8]) -> Result<Self::Ok, Self::Error> {
/// let mut seq = self.serialize_seq(Some(value.len()))?;
/// for b in value {
/// seq.serialize_element(b)?;
@ -718,7 +718,7 @@ pub trait Serializer: Sized {
/// #
/// # fn main() {}
/// ```
fn serialize_bytes(self, value: &[u8]) -> Result<Self::Ok, Self::Error>;
fn serialize_bytes(self, v: &[u8]) -> Result<Self::Ok, Self::Error>;
/// Serialize a [`None`] value.
///