2019 - day1 - part 2: use fuel_calc function

This commit is contained in:
genofire 2020-09-07 21:31:12 +02:00
parent b46919a2e5
commit 18d09765e2

View file

@ -27,7 +27,7 @@ fn fuel_calc(mass: i32) -> i32 {
}
fn fuel_calc_with_fuel(mass: i32) -> i32 {
let fuel = mass / 3 - 2;
let fuel = fuel_calc(mass);
if fuel <= 0 {
return 0;
}