Skip to content

Commit

Permalink
Implement Display for FoundWarningsError instead of relying on Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
arnej committed Feb 19, 2021
1 parent f2d6c32 commit 4a25558
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cargo-geiger/src/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ pub struct FoundWarningsError {

impl Error for FoundWarningsError {}

/// Forward Display to Debug.
impl fmt::Display for FoundWarningsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(self, f)
write!(f, "Found {} warnings", self.warning_count)
}
}

Expand Down

0 comments on commit 4a25558

Please sign in to comment.