removed unstable if let guard

This commit is contained in:
2026-05-31 15:20:29 +01:00
parent 0dc92341e5
commit 10a32423ea
2 changed files with 9 additions and 4 deletions
BIN
View File
Binary file not shown.
+9 -4
View File
@@ -377,11 +377,16 @@ async fn handle_socket
};
let name: Arc<str> = match name.expect("failed to recv socket msg")
{
Message::Text(text)
if let text = text.to_string()
&& validate_name(&text) =>
Message::Text(text) =>
{
Arc::from(text.into_boxed_str())
if validate_name(&text)
{
Arc::from(text.to_string().into_boxed_str())
}
else
{
Arc::from("anon")
}
}
_ => Arc::from("anon"),
};