Skip to content

Commit 1349fd7

Browse files
Add impl<T> AsMut<T> for Exclusive<T>
1 parent 41f2b6b commit 1349fd7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

library/core/src/sync/exclusive.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,14 @@ where
220220
G::resume(self.get_pin_mut(), arg)
221221
}
222222
}
223+
224+
#[unstable(feature = "exclusive_wrapper", issue = "98407")]
225+
impl<T> AsMut<T> for Exclusive<T>
226+
where
227+
T: ?Sized,
228+
{
229+
#[inline(always)]
230+
fn as_mut(&mut self) -> &mut T {
231+
self.get_mut()
232+
}
233+
}

0 commit comments

Comments
 (0)