Skip to content

Commit

Permalink
Merge pull request #191 from arnej/implement-foundwarningserror-display
Browse files Browse the repository at this point in the history
Implement Display for FoundWarningsError instead of relying on Debug
  • Loading branch information
anderejd authored Feb 19, 2021
2 parents f2d6c32 + 4a25558 commit 917dfc3
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 917dfc3

Please sign in to comment.