revme/
dir_utils.rs

1
2
3
4
5
6
7
8
9
10
11
use std::path::{Path, PathBuf};
use walkdir::{DirEntry, WalkDir};

pub fn find_all_json_tests(path: &Path) -> Vec<PathBuf> {
    WalkDir::new(path)
        .into_iter()
        .filter_map(|e| e.ok())
        .filter(|e| e.file_name().to_string_lossy().ends_with(".json"))
        .map(DirEntry::into_path)
        .collect::<Vec<PathBuf>>()
}