[][src]Function conrod_core::utils::write_if_different

pub fn write_if_different<T, I>(elems: &[T], new_elems: I) -> Cow<'_, [T]> where
    T: PartialEq + Clone,
    I: IntoIterator<Item = T>, 

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.