Skip to main content

partition

Function partition 

Source
pub fn partition<T>(
    units: impl IntoIterator<Item = (BuildVariant, T)>,
) -> BTreeMap<String, Partition<T>>
Expand description

Groups units by the variant they were analysed under.

Clone comparison runs inside one partition by default. Two units compiled differently are not two spellings of one thing: the text they share may resolve to different types, take different branches of a header, or exist in only one of the two builds, and a duplication reported across them cannot be removed by editing either one.

Keyed by variant fingerprint so that the grouping is stable across runs and independent of the order units were discovered in.