fix and enable collapsible_if lint

Signed-off-by: June Strawberry <june@vern.cc>
This commit is contained in:
June Strawberry committed 2026-01-18 13:09:03 -05:00
1 parent fb102f0e0a
commit 04e66a03d3
54 files changed
+453 -504

No files matched your search

+4 -4
View File
@@ -49,10 +49,10 @@ pub(super) async fn create_user(&self, username: String, password: Option<String
// Validate user id
let user_id = parse_local_user_id(self.services, &username)?;
if let Err(e) = user_id.validate_strict() {
if self.services.config.emergency_password.is_none() {
return Err!("Username {user_id} contains disallowed characters or spaces: {e}");
}
if let Err(e) = user_id.validate_strict()
&& self.services.config.emergency_password.is_none()
{
return Err!("Username {user_id} contains disallowed characters or spaces: {e}");
}
if self.services.users.exists(&user_id).await {