Compare commits

...

2 Commits

Author SHA1 Message Date
Joeyrp 55ca017e1e fixed conflict 2 years ago
Joeyrp f122a4763c refactor day 1 solutions 2 years ago

@ -12,7 +12,11 @@ fn main()
run_solution(true);
}
<<<<<<< HEAD
fn run_solution(check_for_spelled: bool)
=======
fn run_solution(is_part2: bool)
>>>>>>> b65667e51dd0e26693788041bb3c340edf9cdd3f
{
let data = load_data("data/input");
@ -21,8 +25,13 @@ fn run_solution(is_part2: bool)
let mut sum: u64 = 0;
for line in data.lines()
{
<<<<<<< HEAD
let first = get_digit(line.to_ascii_lowercase().as_bytes(), false, check_for_spelled);
let last = get_digit(line.to_ascii_lowercase().as_bytes(), true, check_for_spelled);
=======
let first = get_digit(line.to_ascii_lowercase().as_bytes(), false, is_part2);
let last = get_digit(line.to_ascii_lowercase().as_bytes(), true, is_part2);
>>>>>>> b65667e51dd0e26693788041bb3c340edf9cdd3f
let num = (first * 10) + last;

Loading…
Cancel
Save