Skip to main content

duplicates

Function duplicates 

Source
pub fn duplicates<T, V: Eq + Hash>(
    source: impl IntoIterator<Item = T>,
    value_selector: impl Fn(&T) -> V,
) -> Vec<T>
Expand description

The items whose value by value_selector is that of another item, group by group in the order of the first item of each group (Duplicates).