Johann Woelper 5 years ago
parent
commit
bdeb14adb2
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/day_4.rs

+ 4 - 3
src/day_4.rs

@@ -37,7 +37,7 @@ pub fn main() {
 
     let mut sum = 0;
     for c in 124075..580769+1 {
-        if let Some(valid_c) = part_1(c) {
+        if let Some(_valid_c) = part_1(c) {
             // println!("{}", valid_c);
             sum +=1;
         }
@@ -45,10 +45,11 @@ pub fn main() {
     println!("part one sum {}", sum);
 
 
+    // Part 2 is Part 1 plus one additional check
     let mut sum = 0;
     for c in 124075..580769+1 {
-        if let Some(valid_c) = part_1(c) {
-            if let Some(second_c) = part_2(c) {
+        if let Some(_valid_c) = part_1(c) {
+            if let Some(_second_c) = part_2(c) {
             sum +=1;
         }
         }