chore: run cargo fmt

This commit is contained in:
Matej Janezic 2022-12-07 00:23:01 +01:00
parent 00000290a2
commit 00000300d5
Signed by: janezicmatej
GPG Key ID: 4298E230ED37B2C0
4 changed files with 5 additions and 10 deletions

View File

@ -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 {

View File

@ -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();

View File

@ -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()

View File

@ -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}");
}