MCPcopy Create free account
hub / github.com/FastLED/FastLED / relative_display_path

Function relative_display_path

ci/lint_cpp_rs/src/lib.rs:1780–1787  ·  view source on GitHub ↗
(path: &str, project_root: &Path)

Source from the content-addressed store, hash-verified

1778}
1779
1780fn relative_display_path(path: &str, project_root: &Path) -> String {
1781 let normalized_root = normalize_path(&path_to_string(project_root));
1782 let normalized_path = normalize_path(path);
1783 normalized_path
1784 .strip_prefix(&format!("{normalized_root}/"))
1785 .unwrap_or(&normalized_path)
1786 .to_string()
1787}
1788
1789fn is_under_dir(path: &str, dir: &str) -> bool {
1790 let normalized = normalize_path(path);

Callers 1

print_text_resultsFunction · 0.85

Calls 3

path_to_stringFunction · 0.85
normalize_pathFunction · 0.70
to_stringMethod · 0.45

Tested by

no test coverage detected