diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-04-30 11:02:28 +0300 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-04-30 11:02:28 +0300 |
commit | 0699795c2a318d6dcbe5a165d18b0ca90497896b (patch) | |
tree | 5b781667e669d65c3de7bb27a897328886b2e3da | |
parent | 43a25ed66fde3e6d81d7bfff157b066c969862ad (diff) | |
download | advent2024-0699795c2a318d6dcbe5a165d18b0ca90497896b.tar.gz advent2024-0699795c2a318d6dcbe5a165d18b0ca90497896b.tar.bz2 advent2024-0699795c2a318d6dcbe5a165d18b0ca90497896b.zip |
-rw-r--r-- | src/day2.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/day2.rs b/src/day2.rs index 81e1ac0..bd9f06c 100644 --- a/src/day2.rs +++ b/src/day2.rs @@ -43,7 +43,7 @@ fn is_also_safe(arr: &[i32]) -> bool { for (i, _item) in arr.iter().enumerate() { let mut test = arr.to_vec(); test.remove(i); - also_safe = if is_safe(&test) {true} else {also_safe}; + also_safe = if is_safe(&test) { true } else { also_safe }; } } safe || also_safe |