Skip to content

Commit

Permalink
lib: remove old try! macro
Browse files Browse the repository at this point in the history
  • Loading branch information
mathstuf committed Oct 1, 2019
1 parent 3714653 commit e764c2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,14 +648,14 @@ impl<'a, T> fmt::Display for DisplayChain<'a, T>
{
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
// Keep `try!` for 1.10 support
try!(writeln!(fmt, "Error: {}", self.0));
writeln!(fmt, "Error: {}", self.0)?;

for e in self.0.iter().skip(1) {
try!(writeln!(fmt, "Caused by: {}", e));
writeln!(fmt, "Caused by: {}", e)?;
}

if let Some(backtrace) = self.0.backtrace() {
try!(writeln!(fmt, "{:?}", backtrace));
writeln!(fmt, "{:?}", backtrace)?;
}

Ok(())
Expand Down

0 comments on commit e764c2b

Please sign in to comment.