fn check_duplicate<'a, T, I>(item: &T, iter: I) -> Result<(), Error>where T: DerOrd + 'a, I: Iterator<Item = &'a T>,
Check if the given item is a duplicate, given an iterator over sorted items (which we can short-circuit once we hit Ordering::Less.
Ordering::Less