From b05291e999ded4f8a1307995ff6a1fd16303fe8f Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Thu, 8 Oct 2026 22:58:47 +0000 Subject: [PATCH] fix(compositor): collapse nested submit condition in winit backend The nested if around backend.submit failed clippy::collapsible_if under -D warnings, breaking the linux-only clippy job. Use a let chain instead. --- crates/weft-compositor/src/backend/winit.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/weft-compositor/src/backend/winit.rs b/crates/weft-compositor/src/backend/winit.rs index 087b04c..7575211 100644 --- a/crates/weft-compositor/src/backend/winit.rs +++ b/crates/weft-compositor/src/backend/winit.rs @@ -157,10 +157,8 @@ pub fn run() -> anyhow::Result<()> { false } }; - if render_ok { - if let Err(e) = backend.submit(Some(&[full_damage])) { - tracing::warn!(?e, "backend submit failed"); - } + if render_ok && let Err(e) = backend.submit(Some(&[full_damage])) { + tracing::warn!(?e, "backend submit failed"); } state.space.elements().for_each(|window| {