MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / directory_facets

Function directory_facets

atomic-repository/src/content_search.rs:394–399  ·  view source on GitHub ↗
(counts: impl IntoIterator<Item = (String, usize)>)

Source from the content-addressed store, hash-verified

392}
393
394fn directory_facets(counts: impl IntoIterator<Item = (String, usize)>) -> Vec<(String, usize)> {
395 let mut facets: Vec<_> = counts.into_iter().collect();
396 facets.sort_by(|a, b| b.1.cmp(&a.1).then_with(|| a.0.cmp(&b.0)));
397 facets.truncate(10);
398 facets
399}
400
401/// Search graph-rendered bytes without consulting the working-copy index.
402/// Path/type matching and line verification use the same syntext machinery as

Callers 2

runMethod · 0.85
rank_content_matchesFunction · 0.85

Calls 4

truncateMethod · 0.80
collectMethod · 0.45
into_iterMethod · 0.45
cmpMethod · 0.45

Tested by

no test coverage detected