From 2b0afb5bb68f84fdc291ade40af31221636d58d9 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 11 Feb 2025 14:28:00 -0500 Subject: Add AsMut impl for Ref in Rust API --- rust/src/rc.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rust/src/rc.rs') diff --git a/rust/src/rc.rs b/rust/src/rc.rs index a096d062..56fd4e8c 100644 --- a/rust/src/rc.rs +++ b/rust/src/rc.rs @@ -68,6 +68,12 @@ impl AsRef for Ref { } } +impl AsMut for Ref { + fn as_mut(&mut self) -> &mut T { + &mut self.contents + } +} + impl Deref for Ref { type Target = T; -- cgit v1.3.1