(dir: &Path, base: &Path, out: &mut Vec<(String, Vec<u8>)>)
| 277 | return shelved; |
| 278 | } |
| 279 | fn walk(dir: &Path, base: &Path, out: &mut Vec<(String, Vec<u8>)>) { |
| 280 | for entry in fs::read_dir(dir).expect("walk shelf") { |
| 281 | let entry = entry.expect("entry"); |
| 282 | let path = entry.path(); |
| 283 | if path.is_dir() { |
| 284 | walk(&path, base, out); |
| 285 | } else { |
| 286 | let relative = path |
| 287 | .strip_prefix(base) |
| 288 | .expect("relative") |
| 289 | .to_string_lossy() |
| 290 | .into_owned(); |
| 291 | out.push((relative, fs::read(&path).expect("shelf bytes"))); |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | for entry in fs::read_dir(&workspaces).expect("walk workspaces") { |
| 296 | let dir = entry.expect("entry").path().join("workspaces"); |
| 297 | if dir.is_dir() { |
no test coverage detected