From 841d1bc7172ebbde8c5716b3d05264e38144870a Mon Sep 17 00:00:00 2001 From: Gino Valente Date: Thu, 5 Sep 2024 14:22:06 -0700 Subject: [PATCH] Reverted usage of NoOpHash Turns out that NoOpHash works by only using the last u64 hash, making collisions very likely when used with ArgumentSignature --- crates/bevy_reflect/src/func/function_map.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/bevy_reflect/src/func/function_map.rs b/crates/bevy_reflect/src/func/function_map.rs index 8fb8aa3ea0..98f61af13d 100644 --- a/crates/bevy_reflect/src/func/function_map.rs +++ b/crates/bevy_reflect/src/func/function_map.rs @@ -2,7 +2,6 @@ use crate::func::signature::ArgumentSignature; use crate::func::{ArgList, FunctionError, FunctionInfo, FunctionInfoType, FunctionOverloadError}; use alloc::borrow::Cow; use bevy_utils::hashbrown::HashMap; -use bevy_utils::NoOpHash; use core::ops::RangeInclusive; /// A helper type for storing a mapping of overloaded functions @@ -28,7 +27,7 @@ pub(super) enum FunctionMap { /// A mapping of argument signatures to the index of the corresponding function. /// /// Multiple signatures may point to the same function index (i.e. for manually created overloads). - HashMap, + HashMap, ), }