mirror of
https://github.com/openharmony/third_party_rust_quote.git
synced 2026-07-19 22:03:30 -04:00
Update Serde snippet to 1.0 api
This commit is contained in:
@@ -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
@@ -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)
|
||||
//! }
|
||||
//! }
|
||||
//!
|
||||
|
||||
Reference in New Issue
Block a user