if !missing_files.is_empty() {
assert!(
false,
- format!(
- "Didn't see a test file for the following files:\n\n{}\n",
- missing_files
- .iter()
- .map(|s| format!("\t{}", s))
- .collect::<Vec<_>>()
- .join("\n")
- )
+ "Didn't see a test file for the following files:\n\n{}\n",
+ missing_files
+ .iter()
+ .map(|s| format!("\t{}", s))
+ .collect::<Vec<_>>()
+ .join("\n")
);
}
}
let mut missing_files: Vec<String> = Vec::new();
let mut current_file = String::new();
let mut files: Vec<DirEntry> = fs::read_dir(dir).unwrap().filter_map(Result::ok).collect();
- files.sort_by_key(|e| e.path());
+ files.sort_by_key(std::fs::DirEntry::path);
for entry in &files {
let path = entry.path();
if path.is_dir() {