summaryrefslogtreecommitdiff
path: root/src/rwlock/read_guard.rs
diff options
context:
space:
mode:
authorMica White <botahamec@gmail.com>2024-12-26 11:26:39 -0500
committerMica White <botahamec@gmail.com>2024-12-26 12:06:47 -0500
commitdc16634f4abdb1e830d2749e64b419740702b302 (patch)
treeeb51ba8293a1c719c7221d546185cfa7062c108c /src/rwlock/read_guard.rs
parent096afea6f13692fddbfad0b07e5377cb2e81dd58 (diff)
Commenting
Diffstat (limited to 'src/rwlock/read_guard.rs')
-rw-r--r--src/rwlock/read_guard.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rwlock/read_guard.rs b/src/rwlock/read_guard.rs
index 44b737e..8678a8e 100644
--- a/src/rwlock/read_guard.rs
+++ b/src/rwlock/read_guard.rs
@@ -10,6 +10,9 @@ use crate::lockable::RawLock;
use super::{RwLock, RwLockReadGuard, RwLockReadRef};
+// 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 RwLockReadRef<'_, T, R> {
fn eq(&self, other: &Self) -> bool {
self.deref().eq(&**other)