diff options
author | zseri <zseri.devel@ytrizja.de> | 2021-12-25T01·27+0100 |
---|---|---|
committer | zseri <zseri.devel@ytrizja.de> | 2021-12-25T01·33+0000 |
commit | 5f2b37bdb07f5b931ac555939710ce681472e04d (patch) | |
tree | 95c4d3ac700747806c279d707b42ceb523f5a939 /users/zseri/store-ref-scanner/src/hbm.rs | |
parent | 8cdda57580bb1b4fdb19091c45b437f6327d78c0 (diff) |
chore(zseri/store-ref-scanner): fix clippy warnings r/3384
Change-Id: I0e75feb501c56a98a73048443c36132308245945 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4597 Tested-by: BuildkiteCI Reviewed-by: zseri <zseri.devel@ytrizja.de>
Diffstat (limited to 'users/zseri/store-ref-scanner/src/hbm.rs')
-rw-r--r-- | users/zseri/store-ref-scanner/src/hbm.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/users/zseri/store-ref-scanner/src/hbm.rs b/users/zseri/store-ref-scanner/src/hbm.rs index 810a0c99cf88..881f1dfdeb75 100644 --- a/users/zseri/store-ref-scanner/src/hbm.rs +++ b/users/zseri/store-ref-scanner/src/hbm.rs @@ -1,6 +1,8 @@ #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub struct HalfBytesMask(pub [u8; 16]); +// fires erronously +#[allow(clippy::zero_prefixed_literal)] impl HalfBytesMask { pub const B32_REVSHA256: HalfBytesMask = HalfBytesMask([0, 0, 0, 0, 0, 0, 255, 3, 0, 0, 0, 0, 222, 127, 207, 7]); @@ -17,7 +19,7 @@ impl HalfBytesMask { let mut tmp = 0; let fin = idx * 8; macro_rules! bitx { - ($($a:expr),+) => {{ $( if x[fin + $a] { tmp += (1 << $a) as u8; } )+ }} + ($($a:expr),+) => {{ $( if x[fin + $a] { tmp += (1 << $a) as u8; } )+ }} } bitx!(0, 1, 2, 3, 4, 5, 6, 7); ret[idx] = tmp; @@ -63,7 +65,7 @@ impl HalfBytesMask { return; } } - let mut block = &mut self.0[usize::from(byte / 8)]; + let block = &mut self.0[usize::from(byte / 8)]; let bitpat = (1 << u32::from(byte % 8)) as u8; if allow { *block |= bitpat; |