Skip to content

Commit

Permalink
handle test error with a clearer message
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Apr 16, 2024
1 parent 23256cd commit 2968805
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,15 @@ impl Test {

impl Drop for Test {
fn drop(&mut self) {
fs::remove_dir_all(&self.dir).unwrap();
fs::remove_dir_all(&self.dir)
.map_err(|e| {
format!(
"failed to clean up test dir '{}': {}",
self.dir.display(),
e
)
})
.unwrap()
}
}

Expand Down

0 comments on commit 2968805

Please sign in to comment.