We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98ecf95 commit d4c322fCopy full SHA for d4c322f
std/src/fs/tests.rs
@@ -1592,6 +1592,6 @@ fn test_read_dir_infinite_loop() {
1592
// Skip the test if we can't open the directory in the first place
1593
let Ok(dir) = fs::read_dir(path) else { return };
1594
1595
- // Iterate through the directory
1596
- for _ in dir {}
+ // Check for duplicate errors
+ assert!(dir.filter(|e| e.is_err()).take(2).count() < 2);
1597
}
0 commit comments