diff --git a/src/error.rs b/src/error.rs index 7324742d4b..758ac9b611 100644 --- a/src/error.rs +++ b/src/error.rs @@ -109,3 +109,25 @@ impl error::Error for OsError {} impl error::Error for ExternalError {} impl error::Error for NotSupportedError {} impl error::Error for RunLoopError {} + +#[cfg(test)] +mod tests { + #![allow(clippy::redundant_clone)] + + use super::*; + + // Eat attributes for testing + #[test] + fn attr_coverage() { + let _ = format!( + "{:?}, {}", + NotSupportedError::new(), + NotSupportedError::new().clone() + ); + let _ = format!( + "{:?}, {}", + ExternalError::NotSupported(NotSupportedError::new()), + ExternalError::NotSupported(NotSupportedError::new()) + ); + } +}