B:BD[
2.1446] → [
2.1446:2117]
match backtrace.status() {
BacktraceStatus::Captured => {
let mut backtrace = backtrace.to_string();
if backtrace.starts_with("stack backtrace:") {
// Capitalize to match "Caused by:"
backtrace.replace_range(0..1, "S");
}
write!(f, "\n{}", backtrace)?;
}
BacktraceStatus::Disabled => {
writeln!(
f,
"\nStack backtrace:\n Run with RUST_LIB_BACKTRACE=1 env variable to display a backtrace"
)?;
if let BacktraceStatus::Captured = backtrace.status() {
let mut backtrace = backtrace.to_string();
if backtrace.starts_with("stack backtrace:") {
// Capitalize to match "Caused by:"
backtrace.replace_range(0..1, "S");