diff --git a/src/bin/12.rs b/src/bin/12.rs index 83ffce5..2c6e2ac 100644 --- a/src/bin/12.rs +++ b/src/bin/12.rs @@ -1,4 +1,4 @@ -use serde_json::{Value, Value::*, from_str}; +use serde_json::{from_str, Value, Value::*}; fn parse_add(json_object: &Value, skip_red: bool) -> i32 { match json_object { diff --git a/src/bin/15.rs b/src/bin/15.rs index 77e410f..e38f8d8 100644 --- a/src/bin/15.rs +++ b/src/bin/15.rs @@ -1,6 +1,6 @@ use lazy_static::lazy_static; use regex::Regex; -use std::{ops::Add, iter::once}; +use std::{iter::once, ops::Add}; lazy_static! { static ref RE: Regex = Regex::new(r#"-?\d+"#).unwrap(); diff --git a/src/bin/download.rs b/src/bin/download.rs index 95ceae5..f93c626 100644 --- a/src/bin/download.rs +++ b/src/bin/download.rs @@ -1,6 +1,5 @@ use dotenv::dotenv; -use reqwest::blocking::Client; -use reqwest::header; +use reqwest::{blocking::Client, header}; use std::{env, fs::OpenOptions, io::Write, process}; fn main() { @@ -28,9 +27,7 @@ fn main() { let client = Client::builder().default_headers(headers).build().unwrap(); let res = client - .get(format!( - "https://adventofcode.com/{year}/day/{day}/input" - )) + .get(format!("https://adventofcode.com/{year}/day/{day}/input")) .send() .unwrap() .text() diff --git a/src/main.rs b/src/main.rs index 3805710..45bca4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,5 @@ fn main() { }) .sum(); - println!( - "{ANSI_BOLD}Total:{ANSI_RESET} {ANSI_ITALIC}{total:.2}ms{ANSI_RESET}" - ); + println!("{ANSI_BOLD}Total:{ANSI_RESET} {ANSI_ITALIC}{total:.2}ms{ANSI_RESET}"); }