Skip to content

Commit 2ee60d2

Browse files
committed
fix position of enabling feature
1 parent 4378463 commit 2ee60d2

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

library/std/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,9 @@
413413
#![feature(edition_panic)]
414414
#![feature(format_args_nl)]
415415
#![feature(log_syntax)]
416+
#![feature(nonpoison_mutex)]
416417
#![feature(test)]
417418
#![feature(trace_macros)]
418-
#![feature(nonpoison_mutex)]
419419
// tidy-alphabetical-end
420420
//
421421
// Only used in tests/benchmarks:

library/std/src/sync/nonpoison/mutex.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,7 @@ impl<T: ?Sized> Mutex<T> {
219219
/// ```
220220
#[unstable(feature = "nonpoison_mutex", issue = "134645")]
221221
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 } }
229223
}
230224

231225
/// Consumes this mutex, returning the underlying data.

0 commit comments

Comments
 (0)