Implement Serialize for core::fmt::Arguments

This commit is contained in:
David Tolnay committed 2018-06-26 23:58:16 -07:00
1 parent d827b101d9
commit 84e384196d
2 files changed
+14

No files matched your search

+9
View File
@@ -69,6 +69,15 @@ impl Serialize for String {
}
}
impl<'a> Serialize for fmt::Arguments<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.collect_str(self)
}
}
////////////////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")]