From 7e1b5c6ce431cfca4387c0148e9a07afc27bab13 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 5 Mar 2017 16:26:05 -0800 Subject: [PATCH] Neater collect_str variable name for rustdoc --- serde/src/ser/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/serde/src/ser/mod.rs b/serde/src/ser/mod.rs index 02c43657..ec3a72c6 100644 --- a/serde/src/ser/mod.rs +++ b/serde/src/ser/mod.rs @@ -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(self, _value: &T) -> Result + fn collect_str(self, value: &T) -> Result 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")) } }