Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Commit 2b12111

Browse files
committed
add
1 parent a872e70 commit 2b12111

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/fallback_hash.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ impl Hasher for AHasher {
173173
let length = data.len() as u64;
174174
//Needs to be an add rather than an xor because otherwise it could be canceled with carefully formed input.
175175
self.buffer = self.buffer.wrapping_add(length).wrapping_mul(MULTIPLE);
176-
self.buffer = 8;
177176
//A 'binary search' on sizes reduces the number of comparisons.
178-
/*if data.len() > 8 {
177+
if data.len() > 8 {
179178
if data.len() > 16 {
180179
let tail = data.read_last_u128();
181180
self.large_update(tail);
@@ -189,8 +188,10 @@ impl Hasher for AHasher {
189188
}
190189
} else {
191190
let value = read_small(data);
192-
self.large_update(value.convert());
193-
}*/
191+
self.buffer = value[0];
192+
self.pad = value[1];
193+
//self.large_update(value.convert());
194+
}
194195
}
195196

196197
#[inline]

0 commit comments

Comments
 (0)