@@ -12,9 +12,7 @@ use std::{
1212 sync,
1313} ;
1414
15- /// A `Mutex` that never poisons and has the same interface as `std::sync::Mutex`.
16- ///
17- /// See [`crate::sync`] for more details.
15+ /// A `Mutex` that never poisons and has the same interface as [`std::sync::Mutex`].
1816pub struct Mutex < T : ?Sized > ( sync:: Mutex < T > ) ;
1917
2018impl < T : ?Sized + fmt:: Debug > fmt:: Debug for Mutex < T > {
@@ -24,22 +22,22 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Mutex<T> {
2422}
2523
2624impl < T > Mutex < T > {
27- /// Like `std::sync::Mutex::new`.
25+ /// Like [ `std::sync::Mutex::new`] .
2826 #[ inline]
2927 pub fn new ( t : T ) -> Mutex < T > {
3028 Mutex ( sync:: Mutex :: new ( t) )
3129 }
3230}
3331
3432impl < T : ?Sized > Mutex < T > {
35- /// Like `std::sync::Mutex::lock`.
33+ /// Like [ `std::sync::Mutex::lock`] .
3634 #[ inline]
3735 pub fn lock ( & self ) -> MutexGuard < ' _ , T > {
3836 MutexGuard ( self . 0 . lock ( ) . unwrap_or_else ( |e| e. into_inner ( ) ) )
3937 }
4038}
4139
42- /// Like `std::sync::MutexGuard`.
40+ /// Like [ `std::sync::MutexGuard`] .
4341#[ must_use]
4442pub struct MutexGuard < ' a , T : ?Sized + ' a > ( sync:: MutexGuard < ' a , T > ) ;
4543
@@ -59,9 +57,7 @@ impl<T: ?Sized> DerefMut for MutexGuard<'_, T> {
5957 }
6058}
6159
62- /// A `RwLock` that never poisons and has the same interface as `std::sync::RwLock`.
63- ///
64- /// See [`crate::sync`] for more details.
60+ /// A `RwLock` that never poisons and has the same interface as [`std::sync::RwLock`].
6561pub struct RwLock < T : ?Sized > ( sync:: RwLock < T > ) ;
6662
6763impl < T : ?Sized + fmt:: Debug > fmt:: Debug for RwLock < T > {
@@ -71,28 +67,28 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for RwLock<T> {
7167}
7268
7369impl < T > RwLock < T > {
74- /// Like `std::sync::RwLock::new`.
70+ /// Like [ `std::sync::RwLock::new`] .
7571 #[ inline]
7672 pub fn new ( t : T ) -> RwLock < T > {
7773 RwLock ( sync:: RwLock :: new ( t) )
7874 }
7975}
8076
8177impl < T : ?Sized > RwLock < T > {
82- /// Like `std::sync::RwLock::read`.
78+ /// Like [ `std::sync::RwLock::read`] .
8379 #[ inline]
8480 pub fn read ( & self ) -> RwLockReadGuard < ' _ , T > {
8581 RwLockReadGuard ( self . 0 . read ( ) . unwrap_or_else ( |e| e. into_inner ( ) ) )
8682 }
8783
88- /// Like `std::sync::RwLock::write`.
84+ /// Like [ `std::sync::RwLock::write`] .
8985 #[ inline]
9086 pub fn write ( & self ) -> RwLockWriteGuard < ' _ , T > {
9187 RwLockWriteGuard ( self . 0 . write ( ) . unwrap_or_else ( |e| e. into_inner ( ) ) )
9288 }
9389}
9490
95- /// Like `std::sync::RwLockReadGuard`.
91+ /// Like [ `std::sync::RwLockReadGuard`] .
9692#[ must_use]
9793pub struct RwLockReadGuard < ' a , T : ?Sized + ' a > ( sync:: RwLockReadGuard < ' a , T > ) ;
9894
@@ -105,7 +101,7 @@ impl<T: ?Sized> Deref for RwLockReadGuard<'_, T> {
105101 }
106102}
107103
108- /// Like `std::sync::RwLockWriteGuard`.
104+ /// Like [ `std::sync::RwLockWriteGuard`] .
109105#[ must_use]
110106pub struct RwLockWriteGuard < ' a , T : ?Sized + ' a > ( sync:: RwLockWriteGuard < ' a , T > ) ;
111107
0 commit comments