Update Serde snippet to 1.0 api

This commit is contained in:
David Tolnay
2018-07-22 11:17:56 -07:00
parent a131a91d7c
commit 8a53e3cccf
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -68,11 +68,11 @@ let tokens = quote! {
}
impl #generics serde::Serialize for SerializeWith #generics #where_clause {
fn serialize<S>(&self, s: &mut S) -> Result<(), S::Error>
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
#path(self.value, s)
#path(self.value, serializer)
}
}
+2 -2
View File
@@ -67,11 +67,11 @@
//! }
//!
//! impl #generics serde::Serialize for SerializeWith #generics #where_clause {
//! fn serialize<S>(&self, s: &mut S) -> Result<(), S::Error>
//! fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
//! where
//! S: serde::Serializer,
//! {
//! #path(self.value, s)
//! #path(self.value, serializer)
//! }
//! }
//!