]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_data_structures/src/sip128.rs
Rollup merge of #92802 - compiler-errors:deduplicate-stack-trace, r=oli-obk
[rust.git] / compiler / rustc_data_structures / src / sip128.rs
index 872b0eb7854ae4c2face1527a766ff89bec0594f..53062b9c20da8b8e6e6118730a518ff98c3bbf3f 100644 (file)
@@ -409,20 +409,6 @@ pub fn finish128(mut self) -> (u64, u64) {
     }
 }
 
-macro_rules! dispatch_value {
-    ($target: expr, $value:expr) => {
-        let value = $value;
-        #[allow(unreachable_patterns)]
-        #[allow(overflowing_literals)]
-        match value {
-            0..=0xFF => $target.short_write(value as u8),
-            0x100..=0xFFFF => $target.short_write(value as u16),
-            0x10000..=0xFFFFFFFF => $target.short_write(value as u32),
-            _ => $target.short_write(value as u64),
-        }
-    };
-}
-
 impl Hasher for SipHasher128 {
     #[inline]
     fn write_u8(&mut self, i: u8) {
@@ -436,7 +422,7 @@ fn write_u16(&mut self, i: u16) {
 
     #[inline]
     fn write_u32(&mut self, i: u32) {
-        dispatch_value!(self, i);
+        self.short_write(i);
     }
 
     #[inline]
@@ -466,7 +452,7 @@ fn write_i32(&mut self, i: i32) {
 
     #[inline]
     fn write_i64(&mut self, i: i64) {
-        dispatch_value!(self, i as u64);
+        self.short_write(i as u64);
     }
 
     #[inline]