We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gix-fs
1 parent 74ecdb8 commit 2c9b214Copy full SHA for 2c9b214
gix-fs/tests/fs/snapshot.rs
@@ -50,5 +50,8 @@ fn has_nanosecond_times(root: &Path) -> std::io::Result<bool> {
50
std::fs::write(&test_file, "b")?;
51
let second_time = test_file.metadata()?.modified()?;
52
53
- Ok(first_time != second_time)
+ Ok(second_time.duration_since(first_time).is_ok_and(|d|
54
+ // This can be falsely false if a filesystem would be ridiculously fast,
55
+ // which means a test won't run even though it could. But that's OK, and unlikely.
56
+ d.subsec_nanos() != 0))
57
}
0 commit comments