Skip to content

Commit a35527d

Browse files
committed
Swap argument order
Signed-off-by: Tom Kaitchuck <Tom.Kaitchuck@gmail.com>
1 parent 680ab00 commit a35527d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/fallback_hash.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ impl AHasher {
5656
#[allow(dead_code)] // Is not called if non-fallback hash is used.
5757
pub(crate) fn from_random_state(rand_state: &RandomState) -> AHasher {
5858
AHasher {
59-
buffer: rand_state.k0,
60-
pad: rand_state.k1,
59+
buffer: rand_state.k1,
60+
pad: rand_state.k0,
6161
extra_keys: [rand_state.k2, rand_state.k3],
6262
}
6363
}
@@ -211,6 +211,7 @@ impl Hasher for AHasherU64 {
211211
#[inline]
212212
fn finish(&self) -> u64 {
213213
folded_multiply(self.buffer, self.pad)
214+
//self.buffer
214215
}
215216

216217
#[inline]

src/random_state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,8 @@ impl BuildHasherExt for RandomState {
470470
#[inline]
471471
fn hash_as_u64<T: Hash + ?Sized>(&self, value: &T) -> u64 {
472472
let mut hasher = AHasherU64 {
473-
buffer: self.k0,
474-
pad: self.k1,
473+
buffer: self.k1,
474+
pad: self.k0,
475475
};
476476
value.hash(&mut hasher);
477477
hasher.finish()

0 commit comments

Comments
 (0)