Skip to main content

replace_or_add

Function replace_or_add 

Source
pub fn replace_or_add<T: Clone + PartialEq>(
    target: &mut dyn IList<T>,
    original: &T,
    replace_with: T,
)
Expand description

Replaces original with replace_with, or adds it when original is not in the list (ListEx.ReplaceOrAdd).