Skip to content

Newtype hashbrown #18694

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 18 commits into from
Apr 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions crates/bevy_picking/src/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ fn build_over_map(
.filter(|e| !cancelled_pointers.contains(&e.pointer))
{
let pointer = entities_under_pointer.pointer;
let layer_map = pointer_over_map
.entry(pointer)
.or_insert_with(BTreeMap::new);
let layer_map = pointer_over_map.entry(pointer).or_default();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated CI failure

for (entity, pick_data) in entities_under_pointer.picks.iter() {
let layer = entities_under_pointer.order;
let hits = layer_map.entry(FloatOrd(layer)).or_default();
Expand Down
10 changes: 8 additions & 2 deletions crates/bevy_platform_support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ default = ["std"]
# Functionality

## Adds serialization support through `serde`.
serialize = ["hashbrown/serde"]
serialize = ["dep:serde", "hashbrown/serde"]

## Adds integration with Rayon.
rayon = ["dep:rayon", "hashbrown/rayon"]

# Platform Compatibility

Expand All @@ -28,10 +31,11 @@ std = [
"portable-atomic-util/std",
"spin/std",
"foldhash/std",
"serde?/std",
]

## Allows access to the `alloc` crate.
alloc = ["portable-atomic-util/alloc", "dep:hashbrown"]
alloc = ["portable-atomic-util/alloc", "dep:hashbrown", "serde?/alloc"]

## `critical-section` provides the building blocks for synchronization primitives
## on all platforms, including `no_std`.
Expand All @@ -57,6 +61,8 @@ hashbrown = { version = "0.15.1", features = [
"equivalent",
"raw-entry",
], optional = true, default-features = false }
serde = { version = "1", default-features = false, optional = true }
rayon = { version = "1", default-features = false, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
web-time = { version = "1.1", default-features = false, optional = true }
Expand Down
68 changes: 0 additions & 68 deletions crates/bevy_platform_support/src/collections.rs

This file was deleted.

Loading