Bugfix for day2
This commit is contained in:
parent
f5ab8bba97
commit
d98b679967
|
@ -52,8 +52,6 @@ fn find_common_letters(lines: &Vec<&str>) -> Result<Vec<char> , 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<char> = line.chars().collect();
|
||||
let candidate2: Vec<char> = line2.chars().collect();
|
||||
|
||||
|
@ -65,7 +63,7 @@ fn find_common_letters(lines: &Vec<&str>) -> Result<Vec<char> , std::io::Error>
|
|||
}
|
||||
}
|
||||
|
||||
return Ok(test);
|
||||
return Ok(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user