Skip to content

Commit ad8d304

Browse files
committed
Implement StableHasher::write_u128 via write_u64
1 parent fd57c6b commit ad8d304

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_data_structures/src/stable_hasher.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ impl Hasher for StableHasher {
107107

108108
#[inline]
109109
fn write_u128(&mut self, i: u128) {
110-
self.state.write(&i.to_le_bytes());
110+
self.write_u64(i as u64);
111+
self.write_u64((i >> 64) as u64);
111112
}
112113

113114
#[inline]

0 commit comments

Comments
 (0)