Function backend::utils::dedup::remove_duplicate[][src]

pub fn remove_duplicate<T: Ord + PartialEq>(v: Vec<T>) -> Vec<T>
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator
Expand description

Remove duplicate elements from a vector.

Use sort_unstable and dedup to remove duplicates from a vector.

Parameters

  • v: The vector to dedup.

Generic Parameters

  • T: The type of the elements in the vector. Should be Ord and PartialEq.

Returns

A vector with no duplicate elements.