diff options
Diffstat (limited to 'src/rwlock/write_guard.rs')
| -rw-r--r-- | src/rwlock/write_guard.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rwlock/write_guard.rs b/src/rwlock/write_guard.rs index c22ebe1..aec3d3d 100644 --- a/src/rwlock/write_guard.rs +++ b/src/rwlock/write_guard.rs @@ -10,6 +10,9 @@ use crate::lockable::RawLock; use super::{RwLock, RwLockWriteGuard, RwLockWriteRef}; +// These impls make things slightly easier because now you can use +// `println!("{guard}")` instead of `println!("{}", *guard)` + impl<T: PartialEq + ?Sized, R: RawRwLock> PartialEq for RwLockWriteRef<'_, T, R> { fn eq(&self, other: &Self) -> bool { self.deref().eq(&**other) |
