Function nannou::ui::utils::write_if_different [−][src]
pub fn write_if_different<T, I>(elems: &[T], new_elems: I) -> Cow<[T]> where
I: IntoIterator<Item = T>,
T: PartialEq<T> + Clone,
Returns Borrowed
elems
if elems
contains the same elements as yielded by new_elems
.
Allocates a new Vec<T>
and returns Owned
if either the number of elements or the elements
themselves differ.