Skip to content

Commit 15bb2e3

Browse files
committed
Don't assert that tempfile::TempDir cleans up
It still does clean up (that is done by RAII; explicitly calling `close()` is just to be able to identify and handle errors). The assertion that it does is not part of what the test is testing, nor is it critical to the correctness of the test itself. I had put it there to catch bugs that might arise during development of the test itself. (In some libraries/frameworks, a recursive deletion on Windows that involves files that need to be accessed with `\\?\` paths does not automatically succeed.)
1 parent 40ac226 commit 15bb2e3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tests/tools/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,6 @@ mod tests {
938938
let status = output.status.code().expect("terminated normally");
939939
assert_eq!(stdout, "", "should be no config variables to display");
940940
assert_eq!(status, 0, "reading the config should nonetheless succeed");
941-
942-
temp.close().expect("Test bug: Should be able to delete everything");
943941
}
944942

945943
#[test]

0 commit comments

Comments
 (0)