(path: &str)
| 2858 | } |
| 2859 | |
| 2860 | fn project_root_prefix_for_file(path: &str) -> String { |
| 2861 | let normalized = normalize_path(path); |
| 2862 | for marker in ["/tests/", "/src/", "/examples/"] { |
| 2863 | if let Some(index) = normalized.find(marker) { |
| 2864 | return normalized[..index].to_string(); |
| 2865 | } |
| 2866 | } |
| 2867 | String::new() |
| 2868 | } |
| 2869 | |
| 2870 | fn join_project_path(root_prefix: &str, rel_path: &str) -> PathBuf { |
| 2871 | if root_prefix.is_empty() { |