Skip to content

Commit

Permalink
Use associated function syntax for Debug and Display backtrace impl
Browse files Browse the repository at this point in the history
Rust was reporting a compilation error saying it was ambiguous which
`fmt` method to call.
  • Loading branch information
azriel91 committed Dec 11, 2018
1 parent 8f8f92f commit c0e2b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backtrace/mod.rs
Expand Up @@ -129,15 +129,15 @@ with_backtrace! {
impl Debug for Backtrace {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if let Some(bt) = self.internal.as_backtrace() {
bt.fmt(f)
Debug::fmt(bt, f)
} else { Ok(()) }
}
}

impl Display for Backtrace {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if let Some(bt) = self.internal.as_backtrace() {
bt.fmt(f)
Display::fmt(bt, f)
} else { Ok(()) }
}
}
Expand Down

0 comments on commit c0e2b52

Please sign in to comment.