(rel: &Path)
| 354 | let src_path = entry?.path(); |
| 355 | let file_name = src_path |
| 356 | .file_name() |
| 357 | .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidData, "source has no file name"))?; |
| 358 | let dst_path = dst.join(file_name); |
| 359 | if src_path.is_dir() { |
| 360 | fs::create_dir_all(&dst_path)?; |
| 361 | copy_dir(&src_path, &dst_path)?; |
| 362 | } else { |
| 363 | fs::copy(&src_path, &dst_path)?; |
| 364 | } |
| 365 | } |
| 366 | Ok(()) |
| 367 | } |
| 368 | |
| 369 | fn collect_markdown( |
| 370 | collection: &str, |
| 371 | root: &Path, |
| 372 | dir: &Path, |
no test coverage detected