Skip to content

Commit

Permalink
small fix to doc wording on read guard methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Lochlanna committed Oct 5, 2023
1 parent e927d19 commit 8f5ccd0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lock_api/src/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ impl<R: RawRwLock, T: ?Sized> RwLock<R, T> {
/// This method must only be called if the thread logically holds a read lock.
///
/// This function does not increment the read count of the lock. Calling this function when a
/// guard has already been produced for the thread is undefined behaviour unless the
/// guard was forgotten with `mem::forget`.`
/// guard has already been produced is undefined behaviour unless the guard was forgotten
/// with `mem::forget`.`
#[inline]
pub unsafe fn make_read_guard_unchecked(&self) -> RwLockReadGuard<'_, R, T> {
RwLockReadGuard {
Expand Down Expand Up @@ -601,8 +601,8 @@ impl<R: RawRwLock, T: ?Sized> RwLock<R, T> {
/// This method must only be called if the thread logically holds a read lock.
///
/// This function does not increment the read count of the lock. Calling this function when a
/// guard has already been produced for the thread is undefined behaviour unless the
/// guard was forgotten with `mem::forget`.`
/// guard has already been produced is undefined behaviour unless the guard was forgotten
/// with `mem::forget`.`
#[cfg(feature = "arc_lock")]
#[inline]
pub unsafe fn make_read_guard_arc_unchecked(self: &Arc<Self>) -> ArcRwLockReadGuard<R, T> {
Expand Down Expand Up @@ -1015,8 +1015,8 @@ impl<R: RawRwLockUpgrade, T: ?Sized> RwLock<R, T> {
/// This method must only be called if the thread logically holds an upgradable read lock.
///
/// This function does not increment the read count of the lock. Calling this function when a
/// guard has already been produced for the thread is undefined behaviour unless the
/// guard was forgotten with `mem::forget`.`
/// guard has already been produced is undefined behaviour unless the guard was forgotten
/// with `mem::forget`.`
#[inline]
pub unsafe fn make_upgradable_guard_unchecked(&self) -> RwLockUpgradableReadGuard<'_, R, T> {
RwLockUpgradableReadGuard {
Expand Down

0 comments on commit 8f5ccd0

Please sign in to comment.