Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit c0e2b52

Browse files
committed
Use associated function syntax for Debug and Display backtrace impl
Rust was reporting a compilation error saying it was ambiguous which `fmt` method to call.
1 parent 8f8f92f commit c0e2b52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backtrace/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ with_backtrace! {
129129
impl Debug for Backtrace {
130130
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
131131
if let Some(bt) = self.internal.as_backtrace() {
132-
bt.fmt(f)
132+
Debug::fmt(bt, f)
133133
} else { Ok(()) }
134134
}
135135
}
136136

137137
impl Display for Backtrace {
138138
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
139139
if let Some(bt) = self.internal.as_backtrace() {
140-
bt.fmt(f)
140+
Display::fmt(bt, f)
141141
} else { Ok(()) }
142142
}
143143
}

0 commit comments

Comments
 (0)