minor rewording after review

Use "the `WouldBlock` error" instead of "the error `WouldBlock`", etc.
This commit is contained in:
Taylor Yu 2021-05-24 09:24:35 -05:00
parent e5873660fc
commit 0e4f8cb661
2 changed files with 6 additions and 6 deletions

View File

@ -294,11 +294,11 @@ impl<T: ?Sized> Mutex<T> {
/// # Errors
///
/// If another user of this mutex panicked while holding the mutex, then
/// this call will return the error [`Poisoned`] if the mutex would
/// this call will return the [`Poisoned`] error if the mutex would
/// otherwise be acquired.
///
/// If the mutex could not be acquired because it is already locked, then
/// this call will return [`WouldBlock`].
/// this call will return the [`WouldBlock`] error.
///
/// [`Poisoned`]: TryLockError::Poisoned
/// [`WouldBlock`]: TryLockError::WouldBlock

View File

@ -199,12 +199,12 @@ impl<T: ?Sized> RwLock<T> {
///
/// # Errors
///
/// This function will return the error [`Poisoned`] if the RwLock is poisoned.
/// This function will return the [`Poisoned`] error if the RwLock is poisoned.
/// An RwLock is poisoned whenever a writer panics while holding an exclusive
/// lock. `Poisoned` will only be returned if the lock would have otherwise been
/// acquired.
///
/// This function will return the error [`WouldBlock`] if the RwLock could not
/// This function will return the [`WouldBlock`] error if the RwLock could not
/// be acquired because it was already locked exclusively.
///
/// [`Poisoned`]: TryLockError::Poisoned
@ -287,12 +287,12 @@ impl<T: ?Sized> RwLock<T> {
///
/// # Errors
///
/// This function will return the error [`Poisoned`] if the RwLock is
/// This function will return the [`Poisoned`] error if the RwLock is
/// poisoned. An RwLock is poisoned whenever a writer panics while holding
/// an exclusive lock. `Poisoned` will only be returned if the lock would have
/// otherwise been acquired.
///
/// This function will return the error [`WouldBlock`] if the RwLock could not
/// This function will return the [`WouldBlock`] error if the RwLock could not
/// be acquired because it was already locked exclusively.
///
/// [`Poisoned`]: TryLockError::Poisoned