diff --git a/day2/src/main.rs b/day2/src/main.rs index 2ecf125..5f6b8a0 100644 --- a/day2/src/main.rs +++ b/day2/src/main.rs @@ -52,8 +52,6 @@ fn find_common_letters(lines: &Vec<&str>) -> Result , std::io::Error> let mismatches = line.chars().zip(line2.chars()).filter(|&(a, b)| a != b).count(); if mismatches == 1 { - let result: Vec<(char,char)> = line.chars().zip(line2.chars()).filter(|&(a, b)| a == b).collect(); - let candidate1: Vec = line.chars().collect(); let candidate2: Vec = line2.chars().collect(); @@ -65,7 +63,7 @@ fn find_common_letters(lines: &Vec<&str>) -> Result , std::io::Error> } } - return Ok(test); + return Ok(result); } } }