Skip to content

Commit

Permalink
Remove incorrect debug_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Apr 13, 2019
1 parent ab3e4ea commit aea2f62
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit aea2f62

Please sign in to comment.