Skip to content

Commit

Permalink
Implement StableHasher::write_u128 via write_u64
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Apr 16, 2023
1 parent fd57c6b commit ad8d304
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_data_structures/src/stable_hasher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ impl Hasher for StableHasher {

#[inline]
fn write_u128(&mut self, i: u128) {
self.state.write(&i.to_le_bytes());
self.write_u64(i as u64);
self.write_u64((i >> 64) as u64);
}

#[inline]
Expand Down

0 comments on commit ad8d304

Please sign in to comment.