From 999761c2586b5466b0e753cecbe42d9b8b10c582 Mon Sep 17 00:00:00 2001 From: ChilePiquin Date: Tue, 15 Sep 2026 07:11:23 -0600 Subject: [PATCH] fix(python): collapse nested if per clippy::collapsible_if Pure style fix, no behavior change -- CI's clippy run (-D warnings) rejected the nested if in get_runtime(). Co-Authored-By: Claude Sonnet 5 --- python/src/runtime.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/src/runtime.rs b/python/src/runtime.rs index 15197716e..8e52a85dc 100644 --- a/python/src/runtime.rs +++ b/python/src/runtime.rs @@ -130,10 +130,10 @@ fn get_runtime() -> Arc { let current_gen = GENERATION.load(Ordering::SeqCst); loop { let existing = RUNTIME.load_full(); - if let Some(existing) = &existing { - if existing.generation == current_gen { - return Arc::clone(existing); - } + if let Some(existing) = &existing + && existing.generation == current_gen + { + return Arc::clone(existing); } if !ATFORK_INSTALLED.fetch_or(true, Ordering::SeqCst) { install_atfork();