Skip to content

Commit

Permalink
use saturating_len where possible (#2316)
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik authored and bkontur committed Jul 24, 2024
1 parent 1492ca9 commit ff91444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridges/modules/messages/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl crate::benchmarking::Config<()> for TestRuntime {
use bp_runtime::RangeInclusiveExt;

let dispatch_weight =
REGULAR_PAYLOAD.declared_weight * params.message_nonces.checked_len().unwrap_or(0);
REGULAR_PAYLOAD.declared_weight * params.message_nonces.saturating_len();
(
*prepare_messages_proof(
params.message_nonces.into_iter().map(|n| message(n, REGULAR_PAYLOAD)).collect(),
Expand Down

0 comments on commit ff91444

Please sign in to comment.