From 4ba65330b2db9f61cbcca7c2f6c6e7f8727ef3de Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Fri, 3 Dec 2021 16:24:32 -0500 Subject: [PATCH] Day 3 Part 1 (Even less gross) --- day_03/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/day_03/src/lib.rs b/day_03/src/lib.rs index 8091c9e..893b49a 100644 --- a/day_03/src/lib.rs +++ b/day_03/src/lib.rs @@ -1,10 +1,10 @@ use std::ops::BitXor; fn parse_input(input: &str) -> Vec> { - let input = input + input .split_whitespace() .map(|inp| make_bit_field(inp)) - .collect::>>(); + .collect::>>() } fn make_bit_field(inp_str: &str) -> Vec { @@ -82,8 +82,8 @@ pub fn part1(input: &str) -> usize { let out = BoolVec(out); - let gamma = dbg!(usize::from(out)); - let epsilon = dbg!(gamma.bitxor(0b1111_1111_1111)); + let gamma = usize::from(out); + let epsilon = gamma.bitxor(0b1111_1111_1111); gamma * epsilon }