Skip to content

Commit

Permalink
auto merge of #12749 : tedhorst/rust/master, r=huonw
Browse files Browse the repository at this point in the history
Minor change to the FVN hashing function based on recommendation on: http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash

cc @alexcrichton
  • Loading branch information
bors committed Mar 7, 2014
2 parents 28e7631 + 0bdd31c commit 85ab68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/util/nodemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ impl Writer for FnvState {
fn write(&mut self, bytes: &[u8]) -> io::IoResult<()> {
let FnvState(mut hash) = *self;
for byte in bytes.iter() {
hash = hash * 0x100000001b3;
hash = hash ^ (*byte as u64);
hash = hash * 0x100000001b3;
}
*self = FnvState(hash);
Ok(())
Expand Down

0 comments on commit 85ab68e

Please sign in to comment.