File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ pub unsafe trait RawMutex {
126
126
}
127
127
128
128
unsafe impl < M : RawMutex > ScopedRawMutex for M {
129
- #[ must_use]
130
129
#[ inline]
131
130
#[ track_caller]
132
131
fn try_with_lock < R > ( & self , f : impl FnOnce ( ) -> R ) -> Option < R > {
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ pub mod cs {
109
109
110
110
unsafe impl ScopedRawMutex for CriticalSectionRawMutex {
111
111
#[ inline]
112
- #[ must_use]
113
112
fn try_with_lock < R > ( & self , f : impl FnOnce ( ) -> R ) -> Option < R > {
114
113
critical_section:: with ( |_| {
115
114
// NOTE: separated load/stores are acceptable as we are in
@@ -173,7 +172,6 @@ pub mod local {
173
172
174
173
unsafe impl ScopedRawMutex for LocalRawMutex {
175
174
#[ inline]
176
- #[ must_use]
177
175
fn try_with_lock < R > ( & self , f : impl FnOnce ( ) -> R ) -> Option < R > {
178
176
// NOTE: separated load/stores are acceptable as we are !Sync,
179
177
// meaning that we can only be accessed within a single thread
@@ -245,7 +243,7 @@ pub mod single_core_thread_mode {
245
243
}
246
244
// NOTE: separated load/stores are acceptable as we checked we are only
247
245
// accessed from a single thread (checked above)
248
- assert ! ( self . taken. load( Ordering :: Relaxed ) ) ;
246
+ assert ! ( ! self . taken. load( Ordering :: Relaxed ) ) ;
249
247
self . taken . store ( true , Ordering :: Relaxed ) ;
250
248
let ret = f ( ) ;
251
249
self . taken . store ( false , Ordering :: Relaxed ) ;
You can’t perform that action at this time.
0 commit comments