mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-25 01:07:56 +00:00
Merge pull request #2785 from Mingun/serialize_entry-in-flatten-newtype-variant
Use serialize_entry instead of serialize_key + serialize_value when serialize flatten newtype enum variant
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user