(root_prefix: &str, dir: &str)
| 2930 | } |
| 2931 | |
| 2932 | fn top_level_headers(root_prefix: &str, dir: &str) -> HashSet<String> { |
| 2933 | let mut headers = HashSet::new(); |
| 2934 | let root = join_project_path(root_prefix, dir); |
| 2935 | let Ok(entries) = fs::read_dir(root) else { |
| 2936 | return headers; |
| 2937 | }; |
| 2938 | for entry in entries.flatten() { |
| 2939 | let path = entry.path(); |
| 2940 | if !path.is_file() { |
| 2941 | continue; |
| 2942 | } |
| 2943 | let name = path |
| 2944 | .file_name() |
| 2945 | .and_then(|value| value.to_str()) |
| 2946 | .unwrap_or(""); |
| 2947 | if name.ends_with(".h") || name.ends_with(".hpp") { |
| 2948 | headers.insert(name.to_string()); |
| 2949 | } |
| 2950 | } |
| 2951 | headers |
| 2952 | } |
| 2953 | |
| 2954 | fn all_test_header_filenames(root_prefix: &str) -> HashSet<String> { |
| 2955 | let root = join_project_path(root_prefix, "tests"); |
no test coverage detected