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:
parent
6ef275e6c3
commit
1d06058a77
4 changed files with 50 additions and 50 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue