Skip to content

Commit

Permalink
Fix ci...
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jul 21, 2024
1 parent 7e09f89 commit e31c00c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ struct Progress {

impl Progress {
fn in_partition(&self, partition: &Partition) -> bool {
let current_index = self.count / self.total.div_ceil(partition.count);
// div_ceil (stabilized at 1.73) can't be used due to MSRV = 1.70...
let mut chunk_count = self.total / partition.count;
if self.total % partition.count != 0 {
chunk_count += 1;
}
let current_index = self.count / chunk_count;
current_index == partition.index
}
}
Expand Down

0 comments on commit e31c00c

Please sign in to comment.