Skip to main content

push_unique

Function push_unique 

Source
fn push_unique<T: Clone + PartialEq>(
    items: &mut Vec<T>,
    item: Cow<'_, T>,
) -> bool
Expand description

Appends item unless an equal value is already present, and returns whether it was appended.