Use serialize_entry instead of serialize_key + serialize_value when serialize flatten newtype enum variant
Serializers that reimplements serialize_entry will get benefits from that
This commit is contained in:
parent
28a092261b
commit
bc5af506bd
@ -1125,8 +1125,7 @@ where
|
||||
where
|
||||
T: ?Sized + Serialize,
|
||||
{
|
||||
tri!(self.0.serialize_key(variant));
|
||||
self.0.serialize_value(value)
|
||||
self.0.serialize_entry(variant, value)
|
||||
}
|
||||
|
||||
fn serialize_seq(self, _: Option<usize>) -> Result<Self::SerializeSeq, Self::Error> {
|
||||
|
Loading…
Reference in New Issue
Block a user