From 482354b25130969308866d7373f882f47993f243 Mon Sep 17 00:00:00 2001 From: Manuel Raimann Date: Fri, 30 Jan 2026 17:46:13 +0100 Subject: [PATCH] fix: update condition to use is_multiple_of for better readability --- tests/async_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/async_tests.rs b/tests/async_tests.rs index f288d5d..ca9c68a 100644 --- a/tests/async_tests.rs +++ b/tests/async_tests.rs @@ -156,7 +156,7 @@ async fn test_optimize_async_partial_failures() { .optimize_async(10, |mut trial| { let count = counter.fetch_add(1, std::sync::atomic::Ordering::SeqCst); async move { - if count % 2 == 0 { + if count.is_multiple_of(2) { let x = trial.suggest_float("x", 0.0, 10.0)?; Ok::<_, TpeError>((trial, x)) } else {