mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-30 00:37:55 +00:00
Serializer::visit_enum_seq{,_elt} should call visit_named_seq{,_elt}
This commit is contained in:
@@ -168,18 +168,18 @@ pub trait Serializer {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn visit_enum_seq<V>(&mut self,
|
fn visit_enum_seq<V>(&mut self,
|
||||||
_name: &'static str,
|
_name: &'static str,
|
||||||
_variant: &'static str,
|
variant: &'static str,
|
||||||
visitor: V) -> Result<(), Self::Error>
|
visitor: V) -> Result<(), Self::Error>
|
||||||
where V: SeqVisitor,
|
where V: SeqVisitor,
|
||||||
{
|
{
|
||||||
self.visit_tuple(visitor)
|
self.visit_named_seq(variant, visitor)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn visit_enum_seq_elt<T>(&mut self, value: T) -> Result<(), Self::Error>
|
fn visit_enum_seq_elt<T>(&mut self, value: T) -> Result<(), Self::Error>
|
||||||
where T: Serialize
|
where T: Serialize
|
||||||
{
|
{
|
||||||
self.visit_tuple_elt(value)
|
self.visit_named_seq_elt(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_map<V>(&mut self, visitor: V) -> Result<(), Self::Error>
|
fn visit_map<V>(&mut self, visitor: V) -> Result<(), Self::Error>
|
||||||
|
|||||||
Reference in New Issue
Block a user