From 5af5919cd7f2fb1321201ed0f207b42e01436191 Mon Sep 17 00:00:00 2001 From: Rustom Shareef <2547411+RustomMS@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:58:14 -0400 Subject: [PATCH] chore: typo in TryLockError for RwLock::try_write - fix incoherent sentence describing when RwLock::try_write (and related) would error with TryLockError --- tokio/src/sync/mutex.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/src/sync/mutex.rs b/tokio/src/sync/mutex.rs index 307d3133ee8..024755c83b5 100644 --- a/tokio/src/sync/mutex.rs +++ b/tokio/src/sync/mutex.rs @@ -200,8 +200,8 @@ unsafe impl<'a, T> Send for MappedMutexGuard<'a, T> where T: ?Sized + Send + 'a /// `RwLock::try_read` operation will only fail if the lock is currently held /// by an exclusive writer. /// -/// `RwLock::try_write` operation will if lock is held by any reader or by an -/// exclusive writer. +/// `RwLock::try_write` operation will only fail if the lock is currently held +/// by any reader or by an exclusive writer. /// /// [`Mutex::try_lock`]: Mutex::try_lock /// [`RwLock::try_read`]: fn@super::RwLock::try_read