mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
chore: refactor backtrace formatting
This commit is contained in:
parent
c0e32983f5
commit
45d35ba4fd
@ -500,13 +500,8 @@ where
|
||||
}
|
||||
|
||||
if self.show_backtrace {
|
||||
let backtrace = self.backtrace();
|
||||
|
||||
if let Some(backtrace) = backtrace {
|
||||
let backtrace = backtrace.to_string();
|
||||
|
||||
f.write_str("\n\nStack backtrace:\n")?;
|
||||
f.write_str(backtrace.trim_end())?;
|
||||
if let Some(backtrace) = self.backtrace() {
|
||||
write!(f, "\n\nStack backtrace:\n{}", backtrace.to_string().trim_end())?;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user