(path: &str)
| 2843 | } |
| 2844 | |
| 2845 | fn project_relative_guess(path: &str) -> String { |
| 2846 | let normalized = normalize_path(path); |
| 2847 | for marker in ["/src/", "/tests/", "/examples/"] { |
| 2848 | if let Some(index) = normalized.find(marker) { |
| 2849 | return normalized[index + 1..].to_string(); |
| 2850 | } |
| 2851 | } |
| 2852 | for prefix in ["src/", "tests/", "examples/"] { |
| 2853 | if normalized.starts_with(prefix) { |
| 2854 | return normalized; |
| 2855 | } |
| 2856 | } |
| 2857 | normalized |
| 2858 | } |
| 2859 | |
| 2860 | fn project_root_prefix_for_file(path: &str) -> String { |
| 2861 | let normalized = normalize_path(path); |
no test coverage detected