Skip to content

Commit 4258282

Browse files
committed
Fix clippy warning
1 parent 7274688 commit 4258282

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

build_system/src/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,10 +679,10 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> {
679679
create_dir(projects_path)?;
680680

681681
let nb_parts = args.nb_parts.unwrap_or(0);
682-
if nb_parts > 0 {
682+
if let Some(count) = projects.len().checked_div(nb_parts) {
683683
// We increment the number of tests by one because if this is an odd number, we would skip
684684
// one test.
685-
let count = projects.len() / nb_parts + 1;
685+
let count = count + 1;
686686
let current_part = args.current_part.unwrap();
687687
let start = current_part * count;
688688
// We remove the projects we don't want to test.

0 commit comments

Comments
 (0)