]> Untitled Git - lemmy.git/commitdiff
Clean up.
authorDessalines <tyhou13@gmx.com>
Sat, 18 Sep 2021 23:53:30 +0000 (19:53 -0400)
committerDessalines <tyhou13@gmx.com>
Sat, 18 Sep 2021 23:53:30 +0000 (19:53 -0400)
crates/api_common/src/lib.rs

index 1e57ffa70386043cec487340d5ba2122c658a95b..933a096c50394a32b8e929f948c21e4fade4832a 100644 (file)
@@ -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(())