mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-18 01:31:03 +00:00
Explicitly make the visit_struct_{,variant}_elt key a &'static str
This commit is contained in:
+8
-10
@@ -231,11 +231,10 @@ pub trait Serializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn visit_struct_elt<K, V>(&mut self,
|
fn visit_struct_elt<V>(&mut self,
|
||||||
key: K,
|
key: &'static str,
|
||||||
value: V) -> Result<(), Self::Error>
|
value: V) -> Result<(), Self::Error>
|
||||||
where K: Serialize,
|
where V: Serialize,
|
||||||
V: Serialize,
|
|
||||||
{
|
{
|
||||||
self.visit_map_elt(key, value)
|
self.visit_map_elt(key, value)
|
||||||
}
|
}
|
||||||
@@ -252,11 +251,10 @@ pub trait Serializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn visit_struct_variant_elt<K, V>(&mut self,
|
fn visit_struct_variant_elt<V>(&mut self,
|
||||||
key: K,
|
key: &'static str,
|
||||||
value: V) -> Result<(), Self::Error>
|
value: V) -> Result<(), Self::Error>
|
||||||
where K: Serialize,
|
where V: Serialize,
|
||||||
V: Serialize,
|
|
||||||
{
|
{
|
||||||
self.visit_struct_elt(key, value)
|
self.visit_struct_elt(key, value)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user