Skip to content

Commit

Permalink
Adding Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMcCormickJr committed Dec 12, 2024
1 parent 0bc702a commit 69b48a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ impl Password {
if password.len() >= 16 {
if password.chars().any(|c: char| c.is_uppercase()) &&
password.chars().any(|c: char| c.is_lowercase()) &&
password.chars().any(|c: char| c.is_digit(10)) &&
password.chars().any(|c: char| c.is_ascii_digit()) &&
password.chars().any(|c: char| !c.is_alphanumeric()) {
return Ok(Self {
Ok(Self {
password: password.to_string(),
});
})
} else {
return Err("Password must contain at least one uppercase letter, one lowercase letter, one number, and one special character");
Err("Password must contain at least one uppercase letter, one lowercase letter, one number, and one special character")
}
} else {
return Err("Password must be at least 16 characters long")
Err("Password must be at least 16 characters long")
}
}
}
Expand Down

0 comments on commit 69b48a1

Please sign in to comment.