From a5a87d18e528967326e5ff3b084f0ad6a3ba8baa Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 18 Oct 2023 17:42:36 -0400 Subject: [PATCH] Correct map serialization --- src/value/variable_map.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/value/variable_map.rs b/src/value/variable_map.rs index e846662..bce7b7d 100644 --- a/src/value/variable_map.rs +++ b/src/value/variable_map.rs @@ -6,11 +6,20 @@ use std::{ use crate::{value::Value, Error, Result, Table}; +impl Serialize for VariableMap { + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + self.variables.serialize(serializer) + } +} + /// A collection dust variables comprised of key-value pairs. /// /// The inner value is a BTreeMap in order to allow VariableMap instances to be sorted and compared /// to one another. -#[derive(Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Deserialize)] pub struct VariableMap { variables: BTreeMap, }