pub fn contains_duplicates<T: Ord>(vec: &[T]) -> bool