Skip to content

Issue #297: Implement From<array> on HashSet and HashMap #298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 6, 2021
Merged

Issue #297: Implement From<array> on HashSet and HashMap #298

merged 7 commits into from
Nov 6, 2021

Conversation

4LT
Copy link
Contributor

@4LT 4LT commented Nov 5, 2021

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 ;)

4LT added 3 commits November 4, 2021 19:33

Verified

This commit was signed with the committer’s verified signature.
andyw8 Andy Waite

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@4LT 4LT changed the title Implement From<array> on HashSet and HashMap Issue #297: Implement From<array> on HashSet and HashMap Nov 5, 2021
@Amanieu
Copy link
Member

Amanieu commented Nov 5, 2021

Since we're due for major version bump, could you update the CI and README to point to the latest stable instead of 1.49?

@4LT
Copy link
Contributor Author

4LT commented Nov 5, 2021

Okay, I've done that, but now builds are failing with --no-default-features set b/c I used the concrete DefaultHashBuilder in my implementations, but that doesn't use the traits BuildHasher and Default when default features are not used.

Ahh, it depends on the feature ahash. Should I gate the inclusion of my implementation on ahash as well?

@Amanieu
Copy link
Member

Amanieu commented Nov 6, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2021

📌 Commit ba8b56c has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Nov 6, 2021

⌛ Testing commit ba8b56c with merge f169c25...

@bors
Copy link
Contributor

bors commented Nov 6, 2021

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing f169c25 to master...

@bors bors merged commit f169c25 into rust-lang:master Nov 6, 2021
Enselic added a commit to Enselic/bat that referenced this pull request Aug 12, 2022
This is what `hashbrown` did recently: rust-lang/hashbrown#298

And it causes CI failures for us. Examples:
* sharkdp#2266
* sharkdp#2265

The path of least resistance for us is to also bump MSRV, so let's do
that. 1.56.1 was released [9 months
ago](https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html).
Enselic added a commit to Enselic/bat that referenced this pull request Aug 12, 2022
This is what `hashbrown` did recently: rust-lang/hashbrown#298

And it causes CI failures for us. Examples:
* sharkdp#2266
* sharkdp#2265

The path of least resistance for us is to also bump MSRV, so let's do
that. 1.56.1 was released [9 months
ago](https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html).
sharkdp pushed a commit to sharkdp/bat that referenced this pull request Aug 13, 2022
This is what `hashbrown` did recently: rust-lang/hashbrown#298

And it causes CI failures for us. Examples:
* #2266
* #2265

The path of least resistance for us is to also bump MSRV, so let's do
that. 1.56.1 was released [9 months
ago](https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants