Skip to content

Commit 88a968c

Browse files
Add impl<T> AsMut<T> for Exclusive<T>
1 parent 128b36a commit 88a968c

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
@@ -250,6 +250,17 @@ where
250250
}
251251
}
252252

253+
#[unstable(feature = "exclusive_wrapper", issue = "98407")]
254+
impl<T> AsMut<T> for Exclusive<T>
255+
where
256+
T: ?Sized,
257+
{
258+
#[inline(always)]
259+
fn as_mut(&mut self) -> &mut T {
260+
self.get_mut()
261+
}
262+
}
263+
253264
#[unstable(feature = "exclusive_wrapper", issue = "98407")]
254265
impl<T> Clone for Exclusive<T>
255266
where

0 commit comments

Comments
 (0)