rust-lang / hashbrown

Rust port of Google's SwissTable hash map
https://rust-lang.github.io/hashbrown
Apache License 2.0
2.46k stars 288 forks source link

Implement `Clone`, `Debug` for iterators #543

Closed clarfonthey closed 3 months ago

clarfonthey commented 3 months ago

Follow-up to #542 after I noticed these were missing too. A more complete implementation of #541.

Adds:

clarfonthey commented 3 months ago

Going to close this per: https://github.com/rust-lang/rust/pull/128711#issuecomment-2295040473

I have some ideas on a refactor that would make implementing Clone a bit more comfortable, and I'll draft up my general plans in an issue first before implementing so folks can comment on them.

I posted some less constructive feedback earlier today, but the long story short is that I think that there need to be more safe wrappers on the internals in the code, rather than every single usage of the raw table being unsafe. I need to do more reading into the code before I make a proper writeup though, so, stay tuned.


Also poked through the currently filed issues just to check for prior art before I start this, and #290 feels relevant here as well. Will want to link that in the issue I file. (Note to self.)