Skip to content

Commit

Permalink
Put extra logic for ConfirmHistory::confirm under else
Browse files Browse the repository at this point in the history
The bit is set in `set_last_tick`, no need to call `set` after it.
  • Loading branch information
Shatur committed Nov 20, 2024
1 parent 1e49d2d commit bcb3a76
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/client/confirm_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ impl ConfirmHistory {
pub fn confirm(&mut self, tick: RepliconTick) {
if tick > self.last_tick {
self.set_last_tick(tick);
}
let ago = self.last_tick - tick;
if ago < u64::BITS {
self.set(ago);
} else {
let ago = self.last_tick - tick;
if ago < u64::BITS {
self.set(ago);
}
}
}

Expand Down

0 comments on commit bcb3a76

Please sign in to comment.