revme/dir_utils.rs
1use std::path::{Path, PathBuf};
2use walkdir::{DirEntry, WalkDir};
3
4pub fn find_all_json_tests(path: &Path) -> Vec<PathBuf> {
5 WalkDir::new(path)
6 .into_iter()
7 .filter_map(|e| e.ok())
8 .filter(|e| e.file_name().to_string_lossy().ends_with(".json"))
9 .map(DirEntry::into_path)
10 .collect::<Vec<PathBuf>>()
11}