| 2879 | } |
| 2880 | |
| 2881 | fn project_relative_path(path: &str) -> Option<String> { |
| 2882 | let normalized = normalize_path(path); |
| 2883 | for marker in ["/tests/", "/src/", "/examples/"] { |
| 2884 | if let Some(index) = normalized.find(marker) { |
| 2885 | return Some(normalized[index + 1..].to_string()); |
| 2886 | } |
| 2887 | } |
| 2888 | for prefix in ["tests/", "src/", "examples/"] { |
| 2889 | if normalized.starts_with(prefix) { |
| 2890 | return Some(normalized); |
| 2891 | } |
| 2892 | } |
| 2893 | None |
| 2894 | } |
| 2895 | |
| 2896 | fn tests_relative_path(path: &str) -> Option<String> { |
| 2897 | let normalized = normalize_path(path); |