refactor: publicly use common types/macros in solution
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
c087e388ac
commit
08246225fb
15 changed files with 5 additions and 47 deletions
|
@ -2,9 +2,6 @@ use std::str::FromStr;
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::{eyre::eyre, Report};
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = Vec<Round>;
|
||||
type Output = i32;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ use std::str::FromStr;
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::eyre::Report;
|
||||
|
||||
type Input = Vec<Backpack>;
|
||||
type Output = i32;
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@ use std::str::FromStr;
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::eyre::Report;
|
||||
|
||||
type Input = Vec<Assignment>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@ use std::str::FromStr;
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::eyre::Report;
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = Ship;
|
||||
type Output = String;
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ use std::collections::HashSet;
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = String;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@ use std::{cell::RefCell, cmp::min, collections::BTreeMap, rc::Rc, str::FromStr};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::Report;
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = Filesystem;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ use std::{cmp::max, collections::BTreeSet};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = Vec<Vec<i8>>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@ use std::{collections::BTreeSet, str::FromStr};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::{eyre::eyre, Report};
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = Vec<Instruction>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -2,10 +2,6 @@ use std::{collections::HashMap, fmt::Display, str::FromStr};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::{eyre::eyre, Report};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
type Input = Vec<Instruction>;
|
||||
type Output = Out;
|
||||
|
||||
|
|
|
@ -2,12 +2,6 @@ use std::{cmp::Reverse, collections::VecDeque, mem, str::FromStr};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::{eyre::eyre, Report};
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use tracing::debug;
|
||||
|
||||
type Input = Vec<Monkey>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ use std::collections::{BTreeSet, VecDeque};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use itertools::Itertools;
|
||||
|
||||
type Input = Vec<Vec<char>>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -2,10 +2,6 @@ use std::{cmp::Ordering, fmt::Display, str::FromStr};
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::Report;
|
||||
use itertools::Itertools;
|
||||
// use tracing::debug;
|
||||
|
||||
type Input = Vec<Pair>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ use std::{
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::Report;
|
||||
use itertools::Itertools;
|
||||
// use tracing::debug;
|
||||
|
||||
type Input = Vec<Line>;
|
||||
type Output = usize;
|
||||
|
||||
|
|
|
@ -6,12 +6,7 @@ use std::{
|
|||
|
||||
use aoc_2022::*;
|
||||
|
||||
use color_eyre::Report;
|
||||
use itertools::Itertools;
|
||||
use lazy_static::lazy_static;
|
||||
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
|
||||
use regex::Regex;
|
||||
// use tracing::debug;
|
||||
|
||||
type Input = Vec<Sensor>;
|
||||
type Output = usize;
|
||||
|
|
|
@ -2,8 +2,11 @@ use std::any::type_name;
|
|||
use std::fmt::Display;
|
||||
pub use std::path::Path;
|
||||
|
||||
pub use color_eyre::eyre::Result;
|
||||
use tracing::info;
|
||||
pub use color_eyre::eyre::{eyre, Report, Result};
|
||||
pub use itertools::Itertools;
|
||||
pub use lazy_static::lazy_static;
|
||||
pub use regex::Regex;
|
||||
pub use tracing::{debug, error, info, trace, warn};
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
pub trait Solution<Input, Output: Display> {
|
||||
|
|
Loading…
Reference in a new issue