From 8f1a31d4b7f0c27aec9af2be52bd4c660ee13bff Mon Sep 17 00:00:00 2001 From: Max Whitehead Date: Sun, 15 Sep 2024 15:38:34 -0700 Subject: [PATCH] fix: impl DesyncHash for arrays --- framework_crates/bones_utils/src/desync_hash.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework_crates/bones_utils/src/desync_hash.rs b/framework_crates/bones_utils/src/desync_hash.rs index 939dee6ff0..9504e387e3 100644 --- a/framework_crates/bones_utils/src/desync_hash.rs +++ b/framework_crates/bones_utils/src/desync_hash.rs @@ -136,6 +136,14 @@ impl DesyncHash for bool { } } +impl DesyncHash for [T; N] { + fn hash(&self, hasher: &mut dyn std::hash::Hasher) { + for value in self { + DesyncHash::hash(value, hasher); + } + } +} + impl DesyncHash for Vec { fn hash(&self, hasher: &mut dyn std::hash::Hasher) { for value in self {