diff --git a/src/tools/borrow.rs b/src/tools/borrow.rs index 5970828d..66b68ada 100644 --- a/src/tools/borrow.rs +++ b/src/tools/borrow.rs @@ -43,3 +43,17 @@ impl AsMut for Tied { self.1.as_mut().unwrap() } } + +impl std::ops::Deref for Tied { + type Target = U; + + fn deref(&self) -> &U { + self.as_ref() + } +} + +impl std::ops::DerefMut for Tied { + fn deref_mut(&mut self) -> &mut U { + self.as_mut() + } +}