Skip to content

Commit

Permalink
Remove extraneous if/else
Browse files Browse the repository at this point in the history
  • Loading branch information
caass committed Sep 16, 2024
1 parent abde8fb commit 29369ce
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/2015/11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ impl Password {

/// Returns the next password that passes validation, if one exists.
fn next_valid(mut self) -> Password {
if self.is_valid() {
self.increment();
}

self.increment();
self.into_par_iter()
.find_first(Password::is_valid)
.expect("to find a valid password")
Expand Down

0 comments on commit 29369ce

Please sign in to comment.