3

Issue #297: Implement From<array> on HashSet and HashMap by 4LT · Pull Req...

 2 years ago
source link: https://github.com/rust-lang/hashbrown/pull/298
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

4LT commented 14 days ago

Implemented From<[T; N]> on HashSet and From<[(K, V); N]> on HashMap. In both cases, the default hasher was used to match the implementations from the std crate (see https://doc.rust-lang.org/src/std/collections/hash/map.rs.html#1161-1190)

Edition was updated to 2021 to take advantage of the change in array's .into_iter method from iterating over &T to iterating over T.

Hopefully the implementations are trivial enough that tests aren't necessary ;)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK