From c1c44a0b81c4ee422141f2e67034371565943d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 10 Sep 2024 19:32:03 +0100 Subject: [PATCH] Impl serialize on TopLevelMap --- milli/src/update/new/indexer/top_level_map.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/milli/src/update/new/indexer/top_level_map.rs b/milli/src/update/new/indexer/top_level_map.rs index 9e1481b5e..d82e42dca 100644 --- a/milli/src/update/new/indexer/top_level_map.rs +++ b/milli/src/update/new/indexer/top_level_map.rs @@ -2,13 +2,13 @@ use std::borrow::{Borrow, Cow}; use std::collections::BTreeMap; use std::fmt; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; use serde_json::value::RawValue; -#[derive(Deserialize)] +#[derive(Deserialize, Serialize)] pub struct TopLevelMap<'p>(#[serde(borrow)] pub BTreeMap, &'p RawValue>); -#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] +#[derive(Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)] pub struct CowStr<'p>(#[serde(borrow)] pub Cow<'p, str>); impl fmt::Display for CowStr<'_> {