(dir: &Path, manifest_dir: &Path, out: &mut Vec<Source>)
| 37 | let path = entry.path(); |
| 38 | if path.is_dir() { |
| 39 | watch_dir(&path); |
| 40 | } else { |
| 41 | println!("cargo:rerun-if-changed={}", path.display()); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | fn collect_sources(dir: &Path, manifest_dir: &Path, out: &mut Vec<Source>) { |
| 47 | let Ok(entries) = fs::read_dir(dir) else { |
| 48 | return; |
| 49 | }; |
| 50 | for entry in entries.flatten() { |
| 51 | let path = entry.path(); |
| 52 | if path.is_dir() { |
| 53 | collect_sources(&path, manifest_dir, out); |
| 54 | continue; |
| 55 | } |
| 56 | if path.extension().and_then(|ext| ext.to_str()) != Some("hll") { |
| 57 | continue; |
| 58 | } |
| 59 | let rel = path.strip_prefix(manifest_dir).expect("source under crate"); |
no test coverage detected