From 2dace3b249711861aa0749dcd21063c9352db77c Mon Sep 17 00:00:00 2001 From: Bogdan Opanchuk Date: Tue, 19 Nov 2024 11:35:16 -0800 Subject: [PATCH] Add a DerefMut impl --- manul/src/utils/serializable_map.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manul/src/utils/serializable_map.rs b/manul/src/utils/serializable_map.rs index 054bea7..af9e019 100644 --- a/manul/src/utils/serializable_map.rs +++ b/manul/src/utils/serializable_map.rs @@ -2,7 +2,7 @@ use alloc::{collections::BTreeMap, format}; use core::{ fmt::{self, Debug}, marker::PhantomData, - ops::Deref, + ops::{Deref, DerefMut}, }; use serde::{ @@ -34,6 +34,12 @@ impl Deref for SerializableMap { } } +impl DerefMut for SerializableMap { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + impl Serialize for SerializableMap where K: Serialize,