File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
storage/blockchain/src/ops/alt_block Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,8 @@ precedence_bits = "deny"
365365as_pointer_underscore = " deny"
366366literal_string_with_formatting_args = " deny"
367367manual_midpoint = " deny"
368+ ip_constant = " deny"
369+ doc_broken_link = " deny"
368370
369371# Warm
370372cast_possible_truncation = " deny"
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub trait RandomX {
5353
5454/// Returns if this height is a RandomX seed height.
5555pub const fn is_randomx_seed_height ( height : usize ) -> bool {
56- height % RX_SEEDHASH_EPOCH_BLOCKS == 0
56+ height. is_multiple_of ( RX_SEEDHASH_EPOCH_BLOCKS )
5757}
5858
5959/// Returns the RandomX seed height for this block.
Original file line number Diff line number Diff line change @@ -228,7 +228,6 @@ mod tests {
228228 types:: AltBlockHeight ,
229229 } ;
230230
231- #[ expect( clippy:: range_plus_one) ]
232231 #[ test]
233232 fn all_alt_blocks ( ) {
234233 let ( env, _tmp) = tmp_concrete_env ( ) ;
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ impl<const N: usize> TryFrom<Bytes> for ByteArrayVec<N> {
192192 type Error = FixedByteError ;
193193
194194 fn try_from ( value : Bytes ) -> Result < Self , Self :: Error > {
195- if value. len ( ) % N != 0 {
195+ if ! value. len ( ) . is_multiple_of ( N ) {
196196 return Err ( FixedByteError :: InvalidLength ) ;
197197 }
198198
@@ -222,7 +222,7 @@ impl<const N: usize> TryFrom<Vec<u8>> for ByteArrayVec<N> {
222222 type Error = FixedByteError ;
223223
224224 fn try_from ( value : Vec < u8 > ) -> Result < Self , Self :: Error > {
225- if value. len ( ) % N != 0 {
225+ if ! value. len ( ) . is_multiple_of ( N ) {
226226 return Err ( FixedByteError :: InvalidLength ) ;
227227 }
228228
You can’t perform that action at this time.
0 commit comments