File tree 2 files changed +2
-8
lines changed
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 409
409
#![ feature( edition_panic) ]
410
410
#![ feature( format_args_nl) ]
411
411
#![ feature( log_syntax) ]
412
+ #![ feature( nonpoison_mutex) ]
412
413
#![ feature( test) ]
413
414
#![ feature( trace_macros) ]
414
- #![ feature( nonpoison_mutex) ]
415
415
// tidy-alphabetical-end
416
416
//
417
417
// Only used in tests/benchmarks:
Original file line number Diff line number Diff line change @@ -219,13 +219,7 @@ impl<T: ?Sized> Mutex<T> {
219
219
/// ```
220
220
#[ unstable( feature = "nonpoison_mutex" , issue = "134645" ) ]
221
221
pub fn try_lock ( & self ) -> Option < MutexGuard < ' _ , T > > {
222
- unsafe {
223
- if self . inner . try_lock ( ) {
224
- Some ( MutexGuard :: new ( self ) )
225
- } else {
226
- None
227
- }
228
- }
222
+ unsafe { if self . inner . try_lock ( ) { Some ( MutexGuard :: new ( self ) ) } else { None } }
229
223
}
230
224
231
225
/// Consumes this mutex, returning the underlying data.
You can’t perform that action at this time.
0 commit comments