Function
collect
(path: &Path, out: &mut Vec<PathBuf>)
Source from the content-addressed store, hash-verified
| 448 | }) |
| 449 | } |
| 450 | fn collect(path: &Path, out: &mut Vec<PathBuf>) -> Result<()> { |
| 451 | if path.is_dir() { |
| 452 | for entry in fs::read_dir(path)? { |
| 453 | let p = entry?.path(); |
| 454 | if !p.is_symlink() { |
| 455 | collect(&p, out)?; |
| 456 | } |
| 457 | } |
| 458 | } else if path.extension().is_some_and(|s| s == "change") { |
| 459 | out.push(path.into()); |
| 460 | } |
| 461 | Ok(()) |
| 462 | } |
| 463 | fn main() -> Result<()> { |
| 464 | let source = std::env::args() |
| 465 | .nth(1) |
Tested by
no test coverage detected