Skip to content

Commit 0e4f8cb

Browse files
committed
minor rewording after review
Use "the `WouldBlock` error" instead of "the error `WouldBlock`", etc.
1 parent e587366 commit 0e4f8cb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/std/src/sync/mutex.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ impl<T: ?Sized> Mutex<T> {
294294
/// # Errors
295295
///
296296
/// If another user of this mutex panicked while holding the mutex, then
297-
/// this call will return the error [`Poisoned`] if the mutex would
297+
/// this call will return the [`Poisoned`] error if the mutex would
298298
/// otherwise be acquired.
299299
///
300300
/// If the mutex could not be acquired because it is already locked, then
301-
/// this call will return [`WouldBlock`].
301+
/// this call will return the [`WouldBlock`] error.
302302
///
303303
/// [`Poisoned`]: TryLockError::Poisoned
304304
/// [`WouldBlock`]: TryLockError::WouldBlock

library/std/src/sync/rwlock.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ impl<T: ?Sized> RwLock<T> {
199199
///
200200
/// # Errors
201201
///
202-
/// This function will return the error [`Poisoned`] if the RwLock is poisoned.
202+
/// This function will return the [`Poisoned`] error if the RwLock is poisoned.
203203
/// An RwLock is poisoned whenever a writer panics while holding an exclusive
204204
/// lock. `Poisoned` will only be returned if the lock would have otherwise been
205205
/// acquired.
206206
///
207-
/// This function will return the error [`WouldBlock`] if the RwLock could not
207+
/// This function will return the [`WouldBlock`] error if the RwLock could not
208208
/// be acquired because it was already locked exclusively.
209209
///
210210
/// [`Poisoned`]: TryLockError::Poisoned
@@ -287,12 +287,12 @@ impl<T: ?Sized> RwLock<T> {
287287
///
288288
/// # Errors
289289
///
290-
/// This function will return the error [`Poisoned`] if the RwLock is
290+
/// This function will return the [`Poisoned`] error if the RwLock is
291291
/// poisoned. An RwLock is poisoned whenever a writer panics while holding
292292
/// an exclusive lock. `Poisoned` will only be returned if the lock would have
293293
/// otherwise been acquired.
294294
///
295-
/// This function will return the error [`WouldBlock`] if the RwLock could not
295+
/// This function will return the [`WouldBlock`] error if the RwLock could not
296296
/// be acquired because it was already locked exclusively.
297297
///
298298
/// [`Poisoned`]: TryLockError::Poisoned

0 commit comments

Comments
 (0)