File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
library/std/src/sys_common Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ impl<T> RefUnwindSafe for ReentrantMutex<T> {}
3737/// guarded data.
3838#[ must_use = "if unused the ReentrantMutex will immediately unlock" ]
3939pub struct ReentrantMutexGuard < ' a , T : ' a > {
40- // funny underscores due to how Deref currently works (it disregards field
41- // privacy).
42- __lock : & ' a ReentrantMutex < T > ,
40+ lock : & ' a ReentrantMutex < T > ,
4341}
4442
4543impl < T > !marker:: Send for ReentrantMutexGuard < ' _ , T > { }
@@ -129,23 +127,23 @@ impl<T: fmt::Debug + 'static> fmt::Debug for ReentrantMutex<T> {
129127
130128impl < ' mutex , T > ReentrantMutexGuard < ' mutex , T > {
131129 fn new ( lock : & ' mutex ReentrantMutex < T > ) -> ReentrantMutexGuard < ' mutex , T > {
132- ReentrantMutexGuard { __lock : lock }
130+ ReentrantMutexGuard { lock }
133131 }
134132}
135133
136134impl < T > Deref for ReentrantMutexGuard < ' _ , T > {
137135 type Target = T ;
138136
139137 fn deref ( & self ) -> & T {
140- & self . __lock . data
138+ & self . lock . data
141139 }
142140}
143141
144142impl < T > Drop for ReentrantMutexGuard < ' _ , T > {
145143 #[ inline]
146144 fn drop ( & mut self ) {
147145 unsafe {
148- self . __lock . inner . unlock ( ) ;
146+ self . lock . inner . unlock ( ) ;
149147 }
150148 }
151149}
You can’t perform that action at this time.
0 commit comments