Skip to content

Commit 37aeb2f

Browse files
EliahKaganByron
andcommitted
Apply further review suggestion
Co-authored-by: Sebastian Thiel <[email protected]>
1 parent b68ba95 commit 37aeb2f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gix-fs/tests/fs/snapshot.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ fn do_journey() -> Result<(), Box<dyn std::error::Error>> {
5151
fn has_granular_times(root: &Path) -> std::io::Result<bool> {
5252
let n = 50;
5353

54-
let names = (0..n).map(|i| format!("{i:03}"));
55-
for name in names.clone() {
56-
std::fs::write(root.join(&name), name)?;
54+
let paths = (0..n).map(|i| root.join(format!("{i:03}")));
55+
for (index, path) in paths.clone().enumerate() {
56+
std::fs::write(&path, index.to_string().as_bytes())?;
5757
}
5858
let mut times = Vec::new();
59-
for name in names {
60-
times.push(root.join(name).symlink_metadata()?.modified()?);
59+
for path in paths {
60+
times.push(path.symlink_metadata()?.modified()?);
6161
}
6262
times.sort();
6363
times.dedup();

0 commit comments

Comments
 (0)