Skip to content

Commit 42dda36

Browse files
committed
mend
1 parent a488536 commit 42dda36

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Diff for: library/std/src/sync/poison/rwlock.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ impl<'a, T: ?Sized> RwLockReadGuard<'a, T> {
923923

924924
#[unstable(feature = "rwlock_try_upgrade", issue = "138559")]
925925
pub fn try_upgrade(orig: Self) -> Result<RwLockWriteGuard<'a, T>, RwLockReadGuard<'a, T>> {
926-
let rwl = &RwLock{
926+
let rwl = &RwLock {
927927
data: UnsafeCell::new(orig.data.as_ptr().read()),
928928
poison: poison::Flag::new(),
929929
inner: *orig.inner_lock,
@@ -939,13 +939,6 @@ impl<'a, T: ?Sized> RwLockReadGuard<'a, T> {
939939
}
940940
}
941941
}
942-
fn f<'a, T>(a: sys::RwLock, b: NonNull<T>) -> RwLock<T>{
943-
unsafe {RwLock{
944-
inner: a,
945-
data: UnsafeCell::new(b.as_ptr().read()),
946-
poison: poison::Flag::new(),
947-
}}
948-
}
949942

950943
impl<'a, T: ?Sized> MappedRwLockReadGuard<'a, T> {
951944
/// Makes a [`MappedRwLockReadGuard`] for a component of the borrowed data,

0 commit comments

Comments
 (0)