indexmap-rs / indexmap

A hash table with consistent order and fast iteration; access items by key or sequence index
https://docs.rs/indexmap/
Other
1.71k stars 150 forks source link

Add `append` methods #337

Closed cuviper closed 2 months ago

cuviper commented 2 months ago

These are like a mix of BTreeMap::append / BTreeSet::append and Vec::append, updating existing entries or else appending new entries, while keeping the original order.

pub fn IndexMap<K, V, S>::append<S2>(&mut self, other: &mut IndexMap<K, V, S2>)
pub fn IndexSet<T, S>::append<S2>(&mut self, other: &mut IndexSet<T, S2>)

Closes #336.