mersinvald / primitive-map-rs

[WIP] Blazing fast [Integer -> T: Clone] Map crate
MIT License
3 stars 1 forks source link

retain methods #12

Open mersinvald opened 6 years ago

mersinvald commented 6 years ago

Implementation of retain is blocked by #10 because of type difference

mersinvald commented 6 years ago

Retain seems to also be clocked by FnMut closure non-copy nature. Taking it by value is impossible as buckets also do take it by value, hence it is moved out at the first iteration over buckets.

Postponing this feature until I figure out how to implement retain either without moving closure or with making a copy of it.