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 25, 2024
1 parent ac8271f commit 0ca7346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridges/modules/xcm-bridge-hub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ pub mod pallet {
outbound_lane.set_state(LaneState::Closed);

// write something to log
let enqueued_messages = outbound_lane.queued_messages().checked_len().unwrap_or(0);
let enqueued_messages = outbound_lane.queued_messages().saturating_len();
log::trace!(
target: LOG_TARGET,
"Bridge {:?} between {:?} and {:?} is closing. {} messages remaining",
Expand Down

0 comments on commit 0ca7346

Please sign in to comment.