Export locked_read and locked_write under internals.

This commit is contained in:
Stephen Chung
2022-11-15 11:22:00 +08:00
parent 8815b88baf
commit 9e5e18af61
3 changed files with 6 additions and 6 deletions

View File

@@ -509,7 +509,8 @@ pub fn shared_take<T>(value: Shared<T>) -> T {
shared_try_take(value).ok().expect("not shared")
}
/// Lock a [`Locked`] resource for mutable access.
/// _(internals)_ Lock a [`Locked`] resource for mutable access.
/// Exported under the `internals` feature only.
#[inline(always)]
#[must_use]
#[allow(dead_code)]
@@ -521,7 +522,8 @@ pub fn locked_read<T>(value: &Locked<T>) -> LockGuard<T> {
return value.read().unwrap();
}
/// Lock a [`Locked`] resource for mutable access.
/// _(internals)_ Lock a [`Locked`] resource for mutable access.
/// Exported under the `internals` feature only.
#[inline(always)]
#[must_use]
#[allow(dead_code)]