Skip to content

Commit 67efc40

Browse files
committed
fix position of enabling feature
1 parent 278430b commit 67efc40

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
@@ -410,9 +410,9 @@
410410
#![feature(edition_panic)]
411411
#![feature(format_args_nl)]
412412
#![feature(log_syntax)]
413+
#![feature(nonpoison_mutex)]
413414
#![feature(test)]
414415
#![feature(trace_macros)]
415-
#![feature(nonpoison_mutex)]
416416
// tidy-alphabetical-end
417417
//
418418
// 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)