std: Reduce checks for feature = "backtrace"
This is a stylistic change to libstd to reduce the number of checks of `feature = "backtrace"` now that we unconditionally depend on the `backtrace` crate and rely on it having an empty implementation. otherwise.
This commit is contained in:
@@ -465,12 +465,9 @@ impl Builder {
|
||||
}
|
||||
|
||||
thread_info::set(imp::guard::current(), their_thread);
|
||||
#[cfg(feature = "backtrace")]
|
||||
let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| {
|
||||
crate::sys_common::backtrace::__rust_begin_short_backtrace(f)
|
||||
}));
|
||||
#[cfg(not(feature = "backtrace"))]
|
||||
let try_result = panic::catch_unwind(panic::AssertUnwindSafe(f));
|
||||
*their_packet.get() = Some(try_result);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user