removed unstable if let guard
This commit is contained in:
Binary file not shown.
+9
-4
@@ -377,11 +377,16 @@ async fn handle_socket
|
|||||||
};
|
};
|
||||||
let name: Arc<str> = match name.expect("failed to recv socket msg")
|
let name: Arc<str> = match name.expect("failed to recv socket msg")
|
||||||
{
|
{
|
||||||
Message::Text(text)
|
Message::Text(text) =>
|
||||||
if let text = text.to_string()
|
|
||||||
&& validate_name(&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"),
|
_ => Arc::from("anon"),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user