parent
00c054d356
commit
296a4b92d6
2 changed files with 6 additions and 1 deletions
1
changelog.d/1340.bugfix
Normal file
1
changelog.d/1340.bugfix
Normal file
|
|
@ -0,0 +1 @@
|
|||
Use exists instead of contains to save writing to a buffer in src/service/users/mod.rs: is_login_disabled. Contributed by @aprilgrimoire.
|
||||
|
|
@ -304,7 +304,11 @@ impl Service {
|
|||
pub fn enable_login(&self, user_id: &UserId) { self.db.userid_logindisabled.remove(user_id); }
|
||||
|
||||
pub async fn is_login_disabled(&self, user_id: &UserId) -> bool {
|
||||
self.db.userid_logindisabled.contains(user_id).await
|
||||
self.db
|
||||
.userid_logindisabled
|
||||
.exists(user_id.as_str())
|
||||
.await
|
||||
.is_ok()
|
||||
}
|
||||
|
||||
/// Check if account is active, infallible
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue