From 29369ce702e47b8b9a643061926e0c1756d2f341 Mon Sep 17 00:00:00 2001 From: Cass Fridkin Date: Mon, 16 Sep 2024 12:32:40 -0600 Subject: [PATCH] Remove extraneous if/else --- src/2015/11.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/2015/11.rs b/src/2015/11.rs index 61a7bc7..716704f 100644 --- a/src/2015/11.rs +++ b/src/2015/11.rs @@ -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")