diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/toml_edit/src/ser/value.rs | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/toml_edit/src/ser/value.rs')
-rw-r--r-- | vendor/toml_edit/src/ser/value.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vendor/toml_edit/src/ser/value.rs b/vendor/toml_edit/src/ser/value.rs index cc7dfb773..d29390a4c 100644 --- a/vendor/toml_edit/src/ser/value.rs +++ b/vendor/toml_edit/src/ser/value.rs @@ -167,15 +167,18 @@ impl serde::ser::Serializer for ValueSerializer { fn serialize_newtype_variant<T: ?Sized>( self, - name: &'static str, + _name: &'static str, _variant_index: u32, - _variant: &'static str, - _value: &T, + variant: &'static str, + value: &T, ) -> Result<Self::Ok, Self::Error> where T: serde::ser::Serialize, { - Err(Error::UnsupportedType(Some(name))) + let value = value.serialize(self)?; + let mut table = crate::InlineTable::new(); + table.insert(variant, value); + Ok(table.into()) } fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq, Self::Error> { |