Skip to content

Commit 4e1c898

Browse files
committed
Fix off-by-one in commit count
1 parent a45a38b commit 4e1c898

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{
99
path::{Path, PathBuf},
1010
process::{Command, Stdio},
1111
str::FromStr,
12-
sync::atomic::{AtomicU64, Ordering},
12+
sync::atomic::{AtomicUsize, Ordering},
1313
time::Duration,
1414
};
1515

@@ -743,7 +743,7 @@ impl Remote {
743743
releases: impl Fn(Branch) -> I,
744744
callback: impl Copy + Fn(Branch, String) -> anyhow::Result<()>,
745745
) -> anyhow::Result<()> {
746-
let count = AtomicU64::new(0);
746+
let count = AtomicUsize::new(1); // Start at 1 since `fetch_add` returns the previous value.
747747
let spinner = ProgressBar::new_spinner();
748748
spinner.set_message("fetching channels...");
749749
spinner.enable_steady_tick(Duration::from_millis(100));

0 commit comments

Comments
 (0)