Skip to content

Commit

Permalink
Eat some coverage in error.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
notgull committed Aug 5, 2023
1 parent 037ae20 commit b08780e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
);
}
}

0 comments on commit b08780e

Please sign in to comment.