Skip to content

Commit 5acedcd

Browse files
authored
Remove signature error source from display message (#1689)
Since errors returned by `std::error::Error::source()` are commonly printed separately, this avoids double-printing the source error message. Fixes #1685.
1 parent 667a5e0 commit 5acedcd

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

signature/src/error.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,7 @@ impl Debug for Error {
7373

7474
impl Display for Error {
7575
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
76-
f.write_str("signature error")?;
77-
78-
#[cfg(feature = "std")]
79-
{
80-
if let Some(source) = &self.source {
81-
write!(f, ": {}", source)?;
82-
}
83-
}
84-
85-
Ok(())
76+
f.write_str("signature error")
8677
}
8778
}
8879

0 commit comments

Comments
 (0)