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

Function private_libcpp_header_recommendation

ci/lint_cpp_rs/src/lib.rs:2615–2626  ·  view source on GitHub ↗
(header: &str)

Source from the content-addressed store, hash-verified

2613}
2614
2615fn private_libcpp_header_recommendation(header: &str) -> &'static str {
2616 if let Some((_, recommendation)) = PRIVATE_LIBCPP_HEADER_MAPPINGS_RS
2617 .iter()
2618 .find(|(candidate, _)| *candidate == header)
2619 {
2620 return *recommendation;
2621 }
2622 PRIVATE_LIBCPP_HEADER_MAPPINGS_RS
2623 .iter()
2624 .find_map(|(prefix, recommendation)| header.starts_with(prefix).then_some(*recommendation))
2625 .unwrap_or("\"appropriate FastLED header\" (check ci/iwyu/stdlib.imp)")
2626}
2627
2628fn banned_header_matches_exception(file_path: &str, header: &str) -> bool {
2629 let normalized = normalize_path(file_path);

Callers 1

check_file_contentMethod · 0.85

Calls 2

findMethod · 0.45
starts_withMethod · 0.45

Tested by

no test coverage detected