Skip to content

Commit f4dab9f

Browse files
Suppressed clippy redundant else error in http.rs using expect syntax. (#1096)
1 parent d8e6a28 commit f4dab9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/webserver/http.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,13 @@ pub async fn run_server(config: &AppConfig, state: AppState) -> anyhow::Result<(
489489
return Ok(());
490490
}
491491
let mut server = HttpServer::new(factory);
492+
#[cfg_attr(
493+
not(target_family = "unix"),
494+
expect(
495+
clippy::redundant_else,
496+
reason = "Conditional compilation produces redundant else when not on unix targets."
497+
)
498+
)]
492499
if let Some(unix_socket) = &config.unix_socket {
493500
log::info!(
494501
"Will start HTTP server on UNIX socket: \"{}\"",

0 commit comments

Comments
 (0)