Skip to content

Commit 85ab68e

Browse files
committed
auto merge of #12749 : tedhorst/rust/master, r=huonw
Minor change to the FVN hashing function based on recommendation on: http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash cc @alexcrichton
2 parents 28e7631 + 0bdd31c commit 85ab68e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/util/nodemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ impl Writer for FnvState {
118118
fn write(&mut self, bytes: &[u8]) -> io::IoResult<()> {
119119
let FnvState(mut hash) = *self;
120120
for byte in bytes.iter() {
121-
hash = hash * 0x100000001b3;
122121
hash = hash ^ (*byte as u64);
122+
hash = hash * 0x100000001b3;
123123
}
124124
*self = FnvState(hash);
125125
Ok(())

0 commit comments

Comments
 (0)