Skip to main content

check_duplicate

Function check_duplicate 

Source
fn check_duplicate<'a, T, I>(item: &T, iter: I) -> Result<(), Error>
where T: DerOrd + 'a, I: Iterator<Item = &'a T>,
Expand description

Check if the given item is a duplicate, given an iterator over sorted items (which we can short-circuit once we hit Ordering::Less.