billyrieger / bimap-rs

Generic bijective maps in Rust
Apache License 2.0
129 stars 26 forks source link

std::iter::Extend for bimap #11

Closed nw0 closed 4 years ago

nw0 commented 4 years ago

Hi, I've found your crate useful and have experimented with implementing std::iter::Extend for BiHashMap.

I have a working implementation (with test), and was wondering if you'd have any interest in a PR? If so I'll open one and we can iterate from there if necessary.

It's straightforward (15 lines) and I'm happy to implement the trait for BiBTreeMap as well, if that's helpful.

billyrieger commented 4 years ago

That would be great! I think it'd be best to implement Extend for both BiHashMap and BiBTreeMap.