tidy: use flatten instead of manual flatten

This commit is contained in:
Marijn Schouten 2025-07-10 08:19:59 +00:00
parent 9bd4c90caf
commit 6356faf848

View file

@ -57,11 +57,9 @@ const EXTENSION_EXCEPTION_PATHS: &[&str] = &[
fn check_entries(tests_path: &Path, bad: &mut bool) {
let mut directories: HashMap<PathBuf, u32> = HashMap::new();
for dir in Walk::new(tests_path.join("ui")) {
if let Ok(entry) = dir {
let parent = entry.path().parent().unwrap().to_path_buf();
*directories.entry(parent).or_default() += 1;
}
for entry in Walk::new(tests_path.join("ui")).flatten() {
let parent = entry.path().parent().unwrap().to_path_buf();
*directories.entry(parent).or_default() += 1;
}
let (mut max, mut max_issues) = (0, 0);