Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/iddqd/src/id_ord_map/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ impl<T: IdOrdItem> IdOrdMap<T> {
) -> Result<Self, DuplicateItem<T>> {
let mut map = IdOrdMap::new();
for value in iter {
// It would be nice to use insert_overwrite here, but that would
// return a `DuplicateItem<T, &T>`, which can only be converted into
// an owned value if T: Clone. Doing this via the Entry API means we
// It would be nice to use insert_unique here, but that would return
// a `DuplicateItem<T, &T>`, which can only be converted into an
// owned value if T: Clone. Doing this via the Entry API means we
// can return a `DuplicateItem<T>` without requiring T to be Clone.
match map.entry(value.key()) {
Entry::Occupied(entry) => {
Expand Down
Loading