pub fn collect_no_duplicates<K, V>(
i: impl Iterator<Item = (K, V)>,
) -> Result<HashMap<K, V>, K>
Expand description
Utility to build a HashMap
of key value pairs from an iterator,
returning an Err
result if there are any duplicate keys in the
iterator.