File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ mod _impl {
30
30
v. write ( )
31
31
}
32
32
33
+ /// Get a mutable reference to the underlying data, with semantics similar to [Arc::make_mut()].
34
+ pub fn make_mut < T : Clone > ( this : & mut OwnShared < T > ) -> & mut T {
35
+ OwnShared :: make_mut ( this)
36
+ }
37
+
33
38
/// Get a mutable reference through a [`Mutable`] for read-write access.
34
39
pub fn lock < T > ( v : & Mutable < T > ) -> parking_lot:: MutexGuard < ' _ , T > {
35
40
v. lock ( )
@@ -75,6 +80,11 @@ mod _impl {
75
80
v. borrow_mut ( )
76
81
}
77
82
83
+ /// Get a mutable reference to the underlying data, with semantics similar to [Rc::make_mut()].
84
+ pub fn make_mut < T : Clone > ( this : & mut OwnShared < T > ) -> & mut T {
85
+ OwnShared :: make_mut ( this)
86
+ }
87
+
78
88
/// Get a mutable reference through a [`Mutable`] for read-write access.
79
89
pub fn lock < T > ( v : & Mutable < T > ) -> RefMut < ' _ , T > {
80
90
v. borrow_mut ( )
You can’t perform that action at this time.
0 commit comments