summaryrefslogtreecommitdiff
path: root/src/mutex/mutex.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/mutex/mutex.rs
parent096afea6f13692fddbfad0b07e5377cb2e81dd58 (diff)
Commenting
Diffstat (limited to 'src/mutex/mutex.rs')
-rw-r--r--src/mutex/mutex.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mutex/mutex.rs b/src/mutex/mutex.rs
index 2cf6bbf..505ff83 100644
--- a/src/mutex/mutex.rs
+++ b/src/mutex/mutex.rs
@@ -165,8 +165,7 @@ impl<T, R: RawMutex> From<T> for Mutex<T, R> {
}
// We don't need a `get_mut` because we don't have mutex poisoning. Hurray!
-// This is safe because you can't have a mutable reference to the lock if it's
-// locked. Being locked requires an immutable reference because of the guard.
+// We have it anyway for documentation
impl<T: ?Sized, R> AsMut<T> for Mutex<T, R> {
fn as_mut(&mut self) -> &mut T {
self.get_mut()