Neater collect_str variable name for rustdoc

This commit is contained in:
David Tolnay
2017-03-05 16:26:05 -08:00
parent 36da8a5cee
commit 7e1b5c6ce4
+2 -1
View File
@@ -638,11 +638,12 @@ pub trait Serializer: Sized {
///
/// The default implementation returns an error unconditionally.
#[cfg(not(any(feature = "std", feature = "collections")))]
fn collect_str<T: ?Sized>(self, _value: &T) -> Result<Self::Ok, Self::Error>
fn collect_str<T: ?Sized>(self, value: &T) -> Result<Self::Ok, Self::Error>
where T: Display,
{
// TODO https://github.com/serde-rs/serde/issues/805
// Remove this impl and force no_std formats to implement collect_str.
let _ = value;
Err(Error::custom("this no_std format does not support serializing strings with collect_str"))
}
}