-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Bevy's HashSet missing some functionality #2115
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
Comments
The standard implementations for |
It was just a slight improvement if I recall correctly. The majority of the change was in the last commit of that PR. I replaced a |
Cool cool. Then I think its worth adding it back, as the whole point is to abstract out the hasher. I also agree that we don't need |
PR bevyengine#1235 had removed the AHashExt trait and respective `with_capacity()`s implementations, leaving only the less ergonomic `HashMap::with_capacity_and_hasher(size, Default::default())` option available. This re-introduces `AHashExt` and respective `with_capacity()` implementations to give a more ergonimic way to set a HashMap / HashSet capacity. As a note, this has also been discussed and agreed on issue bevyengine#2115, which this PR addresses. Fixes bevyengine#2115. Signed-off-by: Tiago Lam <[email protected]>
PR bevyengine#1235 had removed the AHashExt trait and respective `with_capacity()`s implementations, leaving only the less ergonomic `HashMap::with_capacity_and_hasher(size, Default::default())` option available. This re-introduces `AHashExt` and respective `with_capacity()` implementations to give a more ergonomic way to set a HashMap / HashSet capacity. As a note, this has also been discussed and agreed on issue bevyengine#2115, which this PR addresses. Fixes bevyengine#2115. Signed-off-by: Tiago Lam <[email protected]>
PR bevyengine#1235 had removed the `AHashExt` trait and respective `with_capacity()`s implementations, leaving only the less ergonomic `HashMap::with_capacity_and_hasher(size, Default::default())` option available. This re-introduces `AHashExt` and respective `with_capacity()` implementations to give a more ergonomic way to set a `HashMap` / `HashSet` capacity. As a note, this has also been discussed and agreed on issue bevyengine#2115, which this PR addresses. Fixes bevyengine#2115. Signed-off-by: Tiago Lam <[email protected]>
# Objective Re-introduce `AHashExt` and respective `with_capacity()` implementations to give a more ergonomic way to set a `HashMap` / `HashSet` capacity. As a note, this has also been discussed and agreed on issue bevyengine#2115, which this PR addresses (leaving `new()` out of the `AHashExt` trait). Fixes bevyengine#2115. ## Solution PR bevyengine#1235 had removed the `AHashExt` trait and respective `with_capacity()`s implementations, leaving only the less ergonomic `HashMap::with_capacity_and_hasher(size, Default::default())` option available. This re-introduces `AHashExt` and respective `with_capacity()` implementations to give a more ergonomic way to set a `HashMap` / `HashSet` capacity.
Bevy version
0.5
Operating system & version
Windows 10.
What you did
tried to initiate a
HashSet
withwith_capactity()
What you expected to happen
A
HashSet
to be initiated with the wanted capacity.What actually happened
rustc error https://doc.rust-lang.org/error-index.html#E0599
Additional information
no.
The text was updated successfully, but these errors were encountered: