Misc clippy fixes

This commit is contained in:
Luke Parker
2025-09-03 06:10:54 -04:00
parent 2032cf355f
commit a2209dd6ff
5 changed files with 19 additions and 6 deletions

View File

@@ -93,9 +93,8 @@ impl ExternalValidatorSet {
// Check we have room to encode into `res`, using the approximate `size_of` for the max size of
// the serialization
const BYTES_FOR_SET: usize = 32 - (1 + DST.len());
const _ASSERT_MORE_BYTES_THAN_SIZE: [();
BYTES_FOR_SET - core::mem::size_of::<ExternalValidatorSet>()] = [(); _];
32 - (1 + DST.len()) - core::mem::size_of::<ExternalValidatorSet>()] = [(); _];
let encoded = borsh::to_vec(&self).unwrap();
res[(1 + DST.len()) .. (1 + DST.len() + encoded.len())].copy_from_slice(&encoded);