Make backtrace optional

This commit is contained in:
Aleksey Kladov 2020-02-19 16:28:25 +01:00
parent 27587f3501
commit 2ff23c172e
2 changed files with 2 additions and 1 deletions

View file

@ -315,6 +315,7 @@ fn idx_to_children(msgs: &[Message]) -> Vec<Vec<usize>> {
}
/// Prints backtrace to stderr, useful for debugging.
#[cfg(feature = "backtrace")]
pub fn print_backtrace() {
let bt = backtrace::Backtrace::new();
eprintln!("{:?}", bt);