diff options
-rw-r--r-- | src/locators/tracked.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/locators/tracked.rs b/src/locators/tracked.rs index e97f3d8..fc50dcc 100644 --- a/src/locators/tracked.rs +++ b/src/locators/tracked.rs @@ -62,3 +62,15 @@ impl<T: std::hash::Hash> std::hash::Hash for Tracked<T> { self.value.hash(h) } } + +impl<T> std::borrow::Borrow<T> for Tracked<T> { + fn borrow(&self) -> &T { + &self.value + } +} + +impl<T> std::borrow::BorrowMut<T> for Tracked<T> { + fn borrow_mut(&mut self) -> &mut T { + &mut self.value + } +} |