Skip to content

Commit

Permalink
Swap how we print symbols
Browse files Browse the repository at this point in the history
We want to drop the extra hash in short mode, not the other way around!
  • Loading branch information
alexcrichton committed Sep 4, 2019
1 parent f46bf0d commit 4b40b2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/print.rs
Expand Up @@ -220,8 +220,8 @@ impl BacktraceFrameFmt<'_, '_, '_> {
// more information if we're a full backtrace. Here we also handle
// symbols which don't have a name,
match (symbol_name, &self.fmt.format) {
(Some(name), PrintFmt::Short) => write!(self.fmt.fmt, "{}", name)?,
(Some(name), PrintFmt::Full) => write!(self.fmt.fmt, "{:#}", name)?,
(Some(name), PrintFmt::Short) => write!(self.fmt.fmt, "{:#}", name)?,
(Some(name), PrintFmt::Full) => write!(self.fmt.fmt, "{}", name)?,
(None, _) | (_, PrintFmt::__Nonexhaustive) => write!(self.fmt.fmt, "<unknown>")?,
}
self.fmt.fmt.write_str("\n")?;
Expand Down

0 comments on commit 4b40b2e

Please sign in to comment.