From 78c6fbc4a754dc37753360c6a17ff7fcd1699e43 Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Sun, 30 Apr 2023 19:41:35 +0000 Subject: [PATCH] Fix db insert --- problem_03/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problem_03/src/db.rs b/problem_03/src/db.rs index 54afec3..4f587ff 100644 --- a/problem_03/src/db.rs +++ b/problem_03/src/db.rs @@ -18,7 +18,7 @@ impl Db { } pub async fn insert_user(&self, username: String) -> Result<()> { - if !username.is_empty() && username.chars().all(char::is_alphabetic) { + if !username.is_empty() && username.chars().all(char::is_alphanumeric) { self.users.write().await.push(username); Ok(()) } else {