From 721962589c7a36b030a8c73a5aa705e60fdb8d7d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 18 Sep 2021 19:53:30 -0400 Subject: [PATCH] Clean up. --- crates/api_common/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(()) -- 2.44.1