Skip to content

Commit

Permalink
Swap argument order
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Kaitchuck <Tom.Kaitchuck@gmail.com>
  • Loading branch information
tkaitchuck committed Mar 3, 2024
1 parent 680ab00 commit a35527d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/fallback_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ impl AHasher {
#[allow(dead_code)] // Is not called if non-fallback hash is used.
pub(crate) fn from_random_state(rand_state: &RandomState) -> AHasher {
AHasher {
buffer: rand_state.k0,
pad: rand_state.k1,
buffer: rand_state.k1,
pad: rand_state.k0,
extra_keys: [rand_state.k2, rand_state.k3],
}
}
Expand Down Expand Up @@ -211,6 +211,7 @@ impl Hasher for AHasherU64 {
#[inline]
fn finish(&self) -> u64 {
folded_multiply(self.buffer, self.pad)
//self.buffer
}

#[inline]
Expand Down
4 changes: 2 additions & 2 deletions src/random_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ impl BuildHasherExt for RandomState {
#[inline]
fn hash_as_u64<T: Hash + ?Sized>(&self, value: &T) -> u64 {
let mut hasher = AHasherU64 {
buffer: self.k0,
pad: self.k1,
buffer: self.k1,
pad: self.k0,
};
value.hash(&mut hasher);
hasher.finish()
Expand Down

0 comments on commit a35527d

Please sign in to comment.