fix and enable collapsible_if lint

Signed-off-by: June Strawberry <june@vern.cc>
This commit is contained in:
June Strawberry
2026-01-15 17:39:33 -05:00
parent fb102f0e0a
commit 04e66a03d3
54 changed files with 453 additions and 504 deletions

View File

@@ -132,10 +132,10 @@ async fn handle_services_poll(
) -> Result {
debug!("Service manager finished: {result:?}");
if server.running() {
if let Err(e) = server.shutdown() {
error!("Failed to send shutdown signal: {e}");
}
if server.running()
&& let Err(e) = server.shutdown()
{
error!("Failed to send shutdown signal: {e}");
}
if let Err(e) = listener.await {

View File

@@ -174,12 +174,12 @@ async fn fini(server: &Arc<Server>, listener: UnixListener, mut tasks: JoinSet<(
debug!("Shutting down...");
tasks.shutdown().await;
if let Ok(local) = local {
if let Some(path) = local.as_pathname() {
debug!(?path, "Removing unix socket file.");
if let Err(e) = fs::remove_file(path).await {
warn!(?path, "Failed to remove UNIX socket file: {e}");
}
if let Ok(local) = local
&& let Some(path) = local.as_pathname()
{
debug!(?path, "Removing unix socket file.");
if let Err(e) = fs::remove_file(path).await {
warn!(?path, "Failed to remove UNIX socket file: {e}");
}
}
}