From af671ff565e3bd5197768941118135f8259c1778 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Sun, 4 Feb 2024 00:35:09 -0500 Subject: [PATCH] `split`: sync parallel_split chunk_size calc with sequential_split --- src/cmd/split.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/split.rs b/src/cmd/split.rs index 7ee0f72f1..dc8e65aee 100644 --- a/src/cmd/split.rs +++ b/src/cmd/split.rs @@ -146,7 +146,7 @@ impl Args { let args = self.clone(); let chunk_size; let nchunks = if let Some(flag_chunks) = args.flag_chunks { - chunk_size = idx.count() as usize / flag_chunks; + chunk_size = (idx.count() as f64 / flag_chunks as f64).ceil() as usize; flag_chunks } else { chunk_size = args.flag_size;