Fix remaining clippy warnings in socktop_agent

This commit is contained in:
2025-09-04 06:04:57 -07:00
parent 764c25846f
commit eed04f1d5c
2 changed files with 28 additions and 28 deletions
+6 -6
View File
@@ -40,12 +40,12 @@ pub async fn ws_handler(
Query(q): Query<HashMap<String, String>>,
) -> Response {
// optional auth
if let Some(expected) = state.auth_token.as_ref() {
if q.get("token") != Some(expected) {
return ws.on_upgrade(|socket| async move {
let _ = socket.close().await;
});
}
if let Some(expected) = state.auth_token.as_ref()
&& q.get("token") != Some(expected)
{
return ws.on_upgrade(|socket| async move {
let _ = socket.close().await;
});
}
ws.on_upgrade(move |socket| handle_socket(socket, state))
}