diff --git a/serde/src/private/ser.rs b/serde/src/private/ser.rs index 40cc6cbdb..9570629e9 100644 --- a/serde/src/private/ser.rs +++ b/serde/src/private/ser.rs @@ -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) -> Result {