From 4a255584e9577d73aa97546e7f229d5ff1b997cb Mon Sep 17 00:00:00 2001 From: Arne Janbu Date: Fri, 19 Feb 2021 12:47:14 +0100 Subject: [PATCH] Implement Display for FoundWarningsError instead of relying on Debug --- cargo-geiger/src/scan.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cargo-geiger/src/scan.rs b/cargo-geiger/src/scan.rs index c839d404..2c7d81d9 100644 --- a/cargo-geiger/src/scan.rs +++ b/cargo-geiger/src/scan.rs @@ -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) } }