mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Finalize count_local_users function
This commit is contained in:
1 parent
d21030566c
commit
2281bcefc6
1 file changed
+2
-4
@@ -88,10 +88,8 @@ impl Users {
|
|||||||
/// a password thus returning only real accounts on this instance.
|
/// a password thus returning only real accounts on this instance.
|
||||||
#[tracing::instrument(skip(self))]
|
#[tracing::instrument(skip(self))]
|
||||||
pub fn count_local_users(&self) -> Result<usize> {
|
pub fn count_local_users(&self) -> Result<usize> {
|
||||||
self.userid_password.iter().map(|(key, value)| {
|
let n = self.userid_password.iter().filter(|(_, bytes)| bytes.len() > 0).count();
|
||||||
|
Ok(n)
|
||||||
});
|
|
||||||
Ok(1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Find out which user an access token belongs to.
|
/// Find out which user an access token belongs to.
|
||||||
|
|||||||
Reference in new issue
Block a user