diff --git a/2021/4/src/main.rs b/2021/4/src/main.rs index 335ce6e..569361a 100644 --- a/2021/4/src/main.rs +++ b/2021/4/src/main.rs @@ -59,14 +59,12 @@ fn main() { .filter(|row| row[0] == -1 && row[1] == -1 && row[2] == -1 && row[3] == -1 && row[4] == -1 ) - .collect::>() - .len() > 0 + .count() > 0 || (0..5) .filter(|column| board[0][*column] == -1 && board[1][*column] == -1 && board[2][*column] == -1 && board[3][*column] == -1 && board[4][*column] == -1 - ).collect::>() - .len() > 0 + ).count() > 0 ).collect(); if last_winning_boards.len() == 0 && winning_boards.len() == 1 {