1
Fork 0

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 /// # Errors
/// ///
/// If another user of this mutex panicked while holding the mutex, then /// 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. /// otherwise be acquired.
/// ///
/// If the mutex could not be acquired because it is already locked, then /// 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 /// [`Poisoned`]: TryLockError::Poisoned
/// [`WouldBlock`]: TryLockError::WouldBlock /// [`WouldBlock`]: TryLockError::WouldBlock

View file

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