Skip to content

Commit 8b36b2c

Browse files
fix
1 parent 897daf0 commit 8b36b2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/cardano-chain-follower/examples/follow_chains.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ async fn follow_for(network: Network, matches: ArgMatches) {
176176
let mut largest_aux_size: usize = 0;
177177

178178
while let Some(chain_update) = follower.next().await {
179-
updates += 1;
179+
updates = updates.saturating_add(1);
180180

181181
if chain_update.tip {
182182
reached_tip = true;
@@ -196,7 +196,7 @@ async fn follow_for(network: Network, matches: ArgMatches) {
196196
info!(
197197
chain = network.to_string(),
198198
"Chain Update {}:{}",
199-
updates - 1,
199+
updates.saturating_sub(1),
200200
last_update
201201
);
202202
}

0 commit comments

Comments
 (0)