From: Dessalines Date: Sat, 18 Sep 2021 23:53:30 +0000 (-0400) Subject: Clean up. X-Git-Url: http://these/git/%22https:/image.com/%7BcommunityRSSUrl%28?a=commitdiff_plain;h=721962589c7a36b030a8c73a5aa705e60fdb8d7d;p=lemmy.git Clean up. --- diff --git a/crates/api_common/src/lib.rs b/crates/api_common/src/lib.rs index 1e57ffa7..933a096c 100644 --- a/crates/api_common/src/lib.rs +++ b/crates/api_common/src/lib.rs @@ -426,8 +426,7 @@ pub async fn build_federated_instances( /// Checks the password length pub fn password_length_check(pass: &str) -> Result<(), LemmyError> { - let password_length = pass.len(); - if !(10..=60).contains(&password_length) { + if !(10..=60).contains(&pass.len()) { Err(ApiError::err("invalid_password").into()) } else { Ok(())