diff --git a/src/copy_dir.rs b/src/copy_dir.rs index 2f83bcb..be1edb7 100644 --- a/src/copy_dir.rs +++ b/src/copy_dir.rs @@ -296,8 +296,12 @@ mod tests { } fn assert_dirs_same>(a: P, b: P) { - let mut wa = walkdir::WalkDir::new(a.as_ref()).into_iter(); - let mut wb = walkdir::WalkDir::new(b.as_ref()).into_iter(); + let mut wa = walkdir::WalkDir::new(a.as_ref()) + .sort_by_file_name() + .into_iter(); + let mut wb = walkdir::WalkDir::new(b.as_ref()) + .sort_by_file_name() + .into_iter(); loop { let o_na = wa.next();