From 53366d7e156a0c586be9f5131b219809e38ba899 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jun 2026 07:04:05 +0000 Subject: [PATCH 1/5] Update hashbrown requirement from 0.16.1 to 0.17.1 Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version. - [Release notes](https://github.com/rust-lang/hashbrown/releases) - [Changelog](https://github.com/rust-lang/hashbrown/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/hashbrown/compare/v0.16.1...v0.17.1) --- updated-dependencies: - dependency-name: hashbrown dependency-version: 0.17.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- crates/bevy_platform/Cargo.toml | 2 +- crates/bevy_reflect/Cargo.toml | 2 +- tools/build-templated-pages/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_platform/Cargo.toml b/crates/bevy_platform/Cargo.toml index 05d5df9798f2e..00c99de893d4a 100644 --- a/crates/bevy_platform/Cargo.toml +++ b/crates/bevy_platform/Cargo.toml @@ -70,7 +70,7 @@ spin = { version = "0.10.0", default-features = false, features = [ "barrier", ] } foldhash = { version = "0.2.0", default-features = false } -hashbrown = { version = "0.16.1", features = [ +hashbrown = { version = "0.17.1", features = [ "equivalent", "raw-entry", ], optional = true, default-features = false } diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index 6d05db04fc7d1..90c3f1269c7c2 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -103,7 +103,7 @@ bevy_platform = { path = "../bevy_platform", version = "0.19.0-dev", default-fea # used by bevy-utils, but it also needs reflect impls foldhash = { version = "0.2.0", default-features = false } -hashbrown = { version = "0.16.0", optional = true, default-features = false } +hashbrown = { version = "0.17.1", optional = true, default-features = false } # other erased-serde = { version = "0.4", default-features = false, features = [ diff --git a/tools/build-templated-pages/Cargo.toml b/tools/build-templated-pages/Cargo.toml index 8f0279f0369f5..0c046f31b3866 100644 --- a/tools/build-templated-pages/Cargo.toml +++ b/tools/build-templated-pages/Cargo.toml @@ -12,7 +12,7 @@ toml_edit = { version = "0.25.1", default-features = false, features = [ tera = "1.15" serde = { version = "1.0", features = ["derive"] } bitflags = "2.3" -hashbrown = { version = "0.16.0", features = ["serde"] } +hashbrown = { version = "0.17.1", features = ["serde"] } [lints] workspace = true From 2481fb12e4a7fd203022edf9234d76d17a90d33e Mon Sep 17 00:00:00 2001 From: Kevin Chen Date: Mon, 29 Jun 2026 16:55:53 -0400 Subject: [PATCH 2/5] update examples.rs with hashbrown change --- tools/build-templated-pages/src/examples.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/build-templated-pages/src/examples.rs b/tools/build-templated-pages/src/examples.rs index b3329018dbe4c..075e8e85e2ae7 100644 --- a/tools/build-templated-pages/src/examples.rs +++ b/tools/build-templated-pages/src/examples.rs @@ -1,7 +1,7 @@ use core::cmp::Ordering; use std::fs::File; -use hashbrown::HashMap; +use hashbrown::hash_map::{EntryRef, HashMap}; use serde::Serialize; use tera::{Context, Tera}; use toml_edit::{DocumentMut, Item}; @@ -111,7 +111,13 @@ pub(crate) fn check(what_to_run: Command) { let examples_by_category: HashMap, Category> = examples .into_iter() .fold(HashMap::, Vec>::new(), |mut v, ex| { - v.entry_ref(ex.category.as_str()).or_default().push(ex); + match v.entry_ref(ex.category.as_str()) { + EntryRef::Vacant(e) => { + e.insert_with_key(ex.category.as_str().into(), Default::default()) + } + EntryRef::Occupied(e) => e.into_mut(), + } + .push(ex); v }) .into_iter() From eb5611596de35b8d91e5a7582e6c11e78a33a416 Mon Sep 17 00:00:00 2001 From: Kevin Chen Date: Mon, 29 Jun 2026 17:28:17 -0400 Subject: [PATCH 3/5] update gated.rs with hashbrown change --- crates/bevy_asset/src/io/gated.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/crates/bevy_asset/src/io/gated.rs b/crates/bevy_asset/src/io/gated.rs index 6ce2b65b7cc2f..f19d59aaba9e0 100644 --- a/crates/bevy_asset/src/io/gated.rs +++ b/crates/bevy_asset/src/io/gated.rs @@ -1,7 +1,7 @@ use crate::io::{AssetReader, AssetReaderError, PathStream, Reader}; use alloc::{boxed::Box, sync::Arc}; use async_channel::{Receiver, Sender}; -use bevy_platform::{collections::HashMap, sync::RwLock}; +use bevy_platform::{collections::hash_map::EntryRef, collections::HashMap, sync::RwLock}; use std::{path::Path, sync::PoisonError}; /// A "gated" reader that will prevent asset reads from returning until @@ -32,9 +32,12 @@ impl GateOpener { /// If multiple operations are expected, call `open` the expected number of calls. pub fn open>(&self, path: P) { let mut gates = self.gates.write().unwrap_or_else(PoisonError::into_inner); - let gates = gates - .entry_ref(path.as_ref()) - .or_insert_with(async_channel::unbounded); + let gates = match gates.entry_ref(path.as_ref()) { + EntryRef::Vacant(e) => { + e.insert_with_key(path.as_ref().into(), async_channel::unbounded()) + } + EntryRef::Occupied(e) => e.into_mut(), + }; gates.0.send_blocking(()).unwrap(); } } @@ -58,9 +61,10 @@ impl AssetReader for GatedReader { async fn read<'a>(&'a self, path: &'a Path) -> Result { let receiver = { let mut gates = self.gates.write().unwrap_or_else(PoisonError::into_inner); - let gates = gates - .entry_ref(path.as_ref()) - .or_insert_with(async_channel::unbounded); + let gates = match gates.entry_ref(path) { + EntryRef::Vacant(e) => e.insert_with_key(path.into(), async_channel::unbounded()), + EntryRef::Occupied(e) => e.into_mut(), + }; gates.1.clone() }; receiver.recv().await.unwrap(); From e9d754814c59d1b8f1a506f7663b420b8d251209 Mon Sep 17 00:00:00 2001 From: Kevin Chen Date: Mon, 29 Jun 2026 17:29:36 -0400 Subject: [PATCH 4/5] update shader_cache with hashbrown change --- crates/bevy_shader/src/shader_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_shader/src/shader_cache.rs b/crates/bevy_shader/src/shader_cache.rs index 46b4db2a8d68f..2fc071020ec5c 100644 --- a/crates/bevy_shader/src/shader_cache.rs +++ b/crates/bevy_shader/src/shader_cache.rs @@ -324,7 +324,7 @@ impl ShaderCache { let shader_module = (self.load_module)(&self.device, shader_source, &shader.validate_shader)?; - entry.insert(Arc::new(shader_module)) + entry.insert_with_key(shader_defs.into(), Arc::new(shader_module)) } }; From 3263aece0d721b5dc5ea7169155ab58b6eaadb0c Mon Sep 17 00:00:00 2001 From: Kevin Chen Date: Tue, 30 Jun 2026 11:16:48 -0400 Subject: [PATCH 5/5] fix hash_map doc --- crates/bevy_platform/src/collections/hash_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_platform/src/collections/hash_map.rs b/crates/bevy_platform/src/collections/hash_map.rs index 82f6187faeb45..e255e5462bcaf 100644 --- a/crates/bevy_platform/src/collections/hash_map.rs +++ b/crates/bevy_platform/src/collections/hash_map.rs @@ -906,7 +906,7 @@ where /// ```rust /// # use bevy_platform::collections::HashMap; /// let mut map = HashMap::new(); - /// # let mut map: HashMap<&'static str, usize> = map; + /// # let mut map: HashMap = map; /// /// let value = map.entry_ref("foo").or_insert(0); /// #