From aea2f6209621e858ca1e36d0cbb3d8c7b25c96cc Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Fri, 12 Apr 2019 13:44:08 +0100 Subject: [PATCH] Remove incorrect debug_assert --- src/raw/mod.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/raw/mod.rs b/src/raw/mod.rs index e0c7907953..2dec098ac7 100644 --- a/src/raw/mod.rs +++ b/src/raw/mod.rs @@ -118,11 +118,8 @@ fn special_is_empty(ctrl: u8) -> bool { #[inline] #[allow(clippy::cast_possible_truncation)] fn h1(hash: u64) -> usize { - #[cfg(target_pointer_width = "32")] - { - debug_assert!(hash <= u64::from(u32::max_value())); - } - hash as usize // truncation + // On 32-bit platforms we simply ignore the higher hash bits. + hash as usize } /// Secondary hash function, saved in the low 7 bits of the control byte.