Removed trailing spaces in day3

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2021-12-04 01:27:48 +01:00
parent 3cd8684e2a
commit 9ccf4c512c
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -38,7 +38,7 @@ fn get_most_in_col(v: &Vec<Vec<u32>>, c: usize) -> u32 {
fn get_o2(v: &Vec<Vec<u32>>, c: usize) -> u32 {
if v.len() == 1 { return bit_vec_to_u32(&v[0], false); }
let a = get_most_in_col(&v, c);
let f = v.into_iter().filter(|e| e[c] == (a + 1) % 2)
.fold(vec![], |mut acc, e| { acc.push(e.to_owned()); return acc;});
@ -47,7 +47,7 @@ fn get_o2(v: &Vec<Vec<u32>>, c: usize) -> u32 {
fn get_co2(v: &Vec<Vec<u32>>, c: usize) -> u32 {
if v.len() == 1 { return bit_vec_to_u32(&v[0], false); }
let a = get_most_in_col(&v, c);
let f = v.into_iter().filter(|e| e[c] == a)
.fold(vec![], |mut acc, e| { acc.push(e.to_owned()); return acc;});