We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9aa71cc + e5b813b commit abdb759Copy full SHA for abdb759
crates/stdx/src/lib.rs
@@ -19,13 +19,11 @@ pub fn timeit(label: &'static str) -> impl Drop {
19
}
20
21
/// Prints backtrace to stderr, useful for debugging.
22
-#[cfg(feature = "backtrace")]
23
-pub fn print_backtrace() {
24
- let bt = backtrace::Backtrace::new();
25
- eprintln!("{:?}", bt);
26
-}
27
-#[cfg(not(feature = "backtrace"))]
28
pub fn print_backtrace() {
+ #[cfg(feature = "backtrace")]
+ eprintln!("{:?}", backtrace::Backtrace::new());
+
+ #[cfg(not(feature = "backtrace"))]
29
eprintln!(
30
r#"Enable the backtrace feature.
31
Uncomment `default = [ "backtrace" ]` in `crates/stdx/Cargo.toml`.
0 commit comments