Skip to content

Commit

Permalink
Add a DerefMut impl
Browse files Browse the repository at this point in the history
  • Loading branch information
fjarri committed Nov 19, 2024
1 parent 6d905a0 commit 2dace3b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion manul/src/utils/serializable_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use alloc::{collections::BTreeMap, format};
use core::{
fmt::{self, Debug},
marker::PhantomData,
ops::Deref,
ops::{Deref, DerefMut},
};

use serde::{
Expand Down Expand Up @@ -34,6 +34,12 @@ impl<K, V> Deref for SerializableMap<K, V> {
}
}

impl<K, V> DerefMut for SerializableMap<K, V> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}

impl<K, V> Serialize for SerializableMap<K, V>
where
K: Serialize,
Expand Down

0 comments on commit 2dace3b

Please sign in to comment.