Allow SliceIndex to be indexed by ranges.
This commit is contained in:
parent
a74f3fb5fc
commit
162fb713ac
10 changed files with 121 additions and 22 deletions
|
@ -147,7 +147,7 @@ impl<I: Idx, K: Ord, V> FromIterator<(K, V)> for SortedIndexMultiMap<I, K, V> {
|
|||
where
|
||||
J: IntoIterator<Item = (K, V)>,
|
||||
{
|
||||
let items = IndexVec::from_iter(iter);
|
||||
let items = IndexVec::<I, _>::from_iter(iter);
|
||||
let mut idx_sorted_by_item_key: Vec<_> = items.indices().collect();
|
||||
|
||||
// `sort_by_key` is stable, so insertion order is preserved for duplicate items.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue