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.
This commit is contained in:
@@ -102,8 +102,6 @@ async fn wait_for_shutdown(mut shutdown_rx: tokio::sync::watch::Receiver<bool>)
|
|||||||
_ = std::future::pending::<()>() => Ok(()),
|
_ = std::future::pending::<()>() => Ok(()),
|
||||||
_ = shutdown_rx.changed() => Ok(()),
|
_ = shutdown_rx.changed() => Ok(()),
|
||||||
}
|
}
|
||||||
#[allow(unreachable_code)]
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(not(unix), not(target_os = "redox")))]
|
#[cfg(all(not(unix), not(target_os = "redox")))]
|
||||||
|
|||||||
Reference in New Issue
Block a user