From e31c00cae0abcca364255d51a04736c589e256e7 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 21 Jul 2024 16:01:00 +0900 Subject: [PATCH] Fix ci... --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ae69122..3690430 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 } }