From f665929d96395570f66093e2fa7bb35027a77715 Mon Sep 17 00:00:00 2001 From: Vasilito Date: Sat, 25 Apr 2026 12:22:33 +0100 Subject: [PATCH] Fix redbear-sessiond Redox shutdown: remove unreachable code after tokio::select! The #[cfg(target_os = "redox")] variant of wait_for_shutdown had dead code after the tokio::select! block. The select already returns Result<(), _>, so the trailing Ok(()) was unreachable and caused a type mismatch when the compiler tried to coerce the select result into (). Remove the dead code. --- local/recipes/system/redbear-sessiond/source/src/main.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/local/recipes/system/redbear-sessiond/source/src/main.rs b/local/recipes/system/redbear-sessiond/source/src/main.rs index 33a04916..876ec9f4 100644 --- a/local/recipes/system/redbear-sessiond/source/src/main.rs +++ b/local/recipes/system/redbear-sessiond/source/src/main.rs @@ -102,8 +102,6 @@ async fn wait_for_shutdown(mut shutdown_rx: tokio::sync::watch::Receiver) _ = std::future::pending::<()>() => Ok(()), _ = shutdown_rx.changed() => Ok(()), } - #[allow(unreachable_code)] - Ok(()) } #[cfg(all(not(unix), not(target_os = "redox")))]