Force no_std formats to implement collect_str in the future

This commit is contained in:
David Tolnay 2017-03-05 16:22:02 -08:00
parent 880b27b19e
commit fbe85f399d
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -641,6 +641,8 @@ pub trait Serializer: Sized {
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, where T: Display,
{ {
// TODO https://github.com/serde-rs/serde/issues/805
// Remove this impl and force no_std formats to implement collect_str.
Err(Error::custom("Default impl of collect_str errors out for no_std builds")) Err(Error::custom("Default impl of collect_str errors out for no_std builds"))
} }
} }