Skip to content

Commit

Permalink
Print error chain for ConnectionHandlerUpgrErr
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Ermolaev committed Mar 10, 2023
1 parent 4eaa82d commit ad03390
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swarm/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ impl<TUpgrErr> ConnectionHandlerUpgrErr<TUpgrErr> {

impl<TUpgrErr> fmt::Display for ConnectionHandlerUpgrErr<TUpgrErr>
where
TUpgrErr: fmt::Display,
TUpgrErr: error::Error + 'static,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Expand All @@ -467,7 +467,7 @@ where
ConnectionHandlerUpgrErr::Timer => {
write!(f, "Timer error while opening a substream")
}
ConnectionHandlerUpgrErr::Upgrade(err) => write!(f, "{err}"),
err @ ConnectionHandlerUpgrErr::Upgrade(_) => crate::print_error_chain(f, err),
}
}
}
Expand Down

0 comments on commit ad03390

Please sign in to comment.