Update anonymous_manager.rs
This commit is contained in:
parent
6939615b47
commit
c482ea3874
1 changed files with 4 additions and 2 deletions
|
|
@ -26,10 +26,12 @@ pub async fn get_anonymous_user(user_id: u64) -> Option<Arc<AnonymousClientConne
|
|||
pub async fn get_anonymous_user_by_name(
|
||||
username: String,
|
||||
) -> Option<Arc<AnonymousClientConnection>> {
|
||||
for user_conn in ANONYMOUS_USERS
|
||||
let users: Vec<_> = ANONYMOUS_USERS
|
||||
.iter()
|
||||
.map(|ref_multi| ref_multi.value().clone())
|
||||
{
|
||||
.collect();
|
||||
|
||||
for user_conn in users {
|
||||
if user_conn.get_user_name().await == username {
|
||||
return Some(user_conn);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue