Skip to content

Commit d210ce7

Browse files
committed
fix visibility of private getters
Signed-off-by: Connor Tsui <[email protected]>
1 parent b8ee38b commit d210ce7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

library/std/src/sync/nonpoison/mutex.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ impl<T: ?Sized + fmt::Display> fmt::Display for MutexGuard<'_, T> {
457457
}
458458
}
459459

460-
pub fn guard_lock<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a sys::Mutex {
460+
/// For use in [`nonpoison::condvar`](super::condvar).
461+
pub(super) fn guard_lock<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a sys::Mutex {
461462
&guard.lock.inner
462463
}
463464

library/std/src/sync/poison/mutex.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,11 +757,13 @@ impl<T: ?Sized + fmt::Display> fmt::Display for MutexGuard<'_, T> {
757757
}
758758
}
759759

760-
pub fn guard_lock<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a sys::Mutex {
760+
/// For use in [`nonpoison::condvar`](super::condvar).
761+
pub(super) fn guard_lock<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a sys::Mutex {
761762
&guard.lock.inner
762763
}
763764

764-
pub fn guard_poison<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a poison::Flag {
765+
/// For use in [`nonpoison::condvar`](super::condvar).
766+
pub(super) fn guard_poison<'a, T: ?Sized>(guard: &MutexGuard<'a, T>) -> &'a poison::Flag {
765767
&guard.lock.poison
766768
}
767769

0 commit comments

Comments
 (0)