From 10431400a06317b188fa9d5814e995f98264812a Mon Sep 17 00:00:00 2001 From: Jan Baudisch Date: Sun, 1 Dec 2019 18:09:59 +0000 Subject: [PATCH] fix format --- common/src/input.rs | 4 ++-- day_01/src/main.rs | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/src/input.rs b/common/src/input.rs index 8152e7c..2fba4bb 100644 --- a/common/src/input.rs +++ b/common/src/input.rs @@ -7,7 +7,7 @@ pub fn read_line() -> String { Ok(_) => { input.pop(); } - Err(error) => panic!("{}", error) + Err(error) => panic!("{}", error), } input @@ -29,7 +29,7 @@ pub fn read_lines() -> Vec { lines.push(input.clone()); } - Err(error) => panic!("{}", error) + Err(error) => panic!("{}", error), } } diff --git a/day_01/src/main.rs b/day_01/src/main.rs index e701372..0acb210 100644 --- a/day_01/src/main.rs +++ b/day_01/src/main.rs @@ -7,13 +7,19 @@ fn main() { .map(|x| calculate_fuel(&x) as u32) .collect(); - println!("[PART ONE] sum of the fuel requirements: {}", fuel.iter().sum::()); + println!( + "[PART ONE] sum of the fuel requirements: {}", + fuel.iter().sum::() + ); for f in fuel.iter_mut() { *f += calculate_fuel_recursive(f); } - println!("[PART TWO] sum of the fuel requirements: {}", fuel.iter().sum::()); + println!( + "[PART TWO] sum of the fuel requirements: {}", + fuel.iter().sum::() + ); } fn calculate_fuel(mass: &u32) -> i32 { -- 2.45.2