(path: &Path, paths: &mut Vec<PathBuf>)
| 59 | } |
| 60 | |
| 61 | fn collect(path: &Path, paths: &mut Vec<PathBuf>) -> Result<()> { |
| 62 | if path.is_dir() { |
| 63 | for entry in fs::read_dir(path)? { |
| 64 | collect(&entry?.path(), paths)?; |
| 65 | } |
| 66 | } else if path.extension().is_some_and(|s| s == "change") { |
| 67 | paths.push(path.into()); |
| 68 | } |
| 69 | Ok(()) |
| 70 | } |
| 71 | |
| 72 | fn measure(path: &Path, level: i32) -> Result<Row> { |
| 73 | let mut input = BufReader::new(fs::File::open(path)?); |