diff --git a/proxmox-schema/src/ser/mod.rs b/proxmox-schema/src/ser/mod.rs index 3dad6d68..e19209a8 100644 --- a/proxmox-schema/src/ser/mod.rs +++ b/proxmox-schema/src/ser/mod.rs @@ -483,14 +483,13 @@ impl Serializer for ElementSerializer { } fn serialize_unit_variant( - self, - name: &'static str, + mut self, + _name: &'static str, _index: u32, variant: &'static str, ) -> Result { - Err(Error::msg(format!( - "tried to serialize a unit variant ({name}::{variant})" - ))) + self.inner.write_str(variant)?; + Ok(self.inner) } fn serialize_newtype_struct(self, _name: &'static str, value: &V) -> Result