Clean up.

password_min_length
Dessalines 2021-09-18 19:53:30 -04:00
parent 1033995801
commit 721962589c
1 changed files with 1 additions and 2 deletions

View File

@ -426,8 +426,7 @@ pub async fn build_federated_instances(
/// Checks the password length /// Checks the password length
pub fn password_length_check(pass: &str) -> Result<(), LemmyError> { pub fn password_length_check(pass: &str) -> Result<(), LemmyError> {
let password_length = pass.len(); if !(10..=60).contains(&pass.len()) {
if !(10..=60).contains(&password_length) {
Err(ApiError::err("invalid_password").into()) Err(ApiError::err("invalid_password").into())
} else { } else {
Ok(()) Ok(())