Keep underscored names out of the documentation

This commit is contained in:
David Tolnay 2017-04-14 14:38:58 -07:00
parent e722cf8791
commit d10fa2bd86
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -65,10 +65,11 @@ impl de::Error for Error {
}
#[cfg(not(any(feature = "std", feature = "collections")))]
fn custom<T>(_msg: T) -> Self
fn custom<T>(msg: T) -> Self
where
T: Display,
{
let _ = msg;
Error { err: () }
}
}
@ -241,13 +242,15 @@ where
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
name: &str,
variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
let _ = name;
let _ = variants;
visitor.visit_enum(self)
}
}
@ -305,13 +308,15 @@ where
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
name: &str,
variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
let _ = name;
let _ = variants;
visitor.visit_enum(self)
}
@ -378,13 +383,15 @@ where
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
name: &str,
variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
let _ = name;
let _ = variants;
visitor.visit_enum(self)
}
@ -455,13 +462,15 @@ where
fn deserialize_enum<V>(
self,
_name: &str,
_variants: &'static [&'static str],
name: &str,
variants: &'static [&'static str],
visitor: V,
) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
let _ = name;
let _ = variants;
visitor.visit_enum(self)
}
@ -761,12 +770,13 @@ where
fn deserialize_seq_fixed_size<V>(
self,
_len: usize,
len: usize,
visitor: V,
) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
let _ = len;
self.deserialize_seq(visitor)
}