1
0
Fork 0

refactor: publicly use common types/macros in solution

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2023-01-06 20:00:52 +01:00
parent c087e388ac
commit 08246225fb
Signed by: mfocko
GPG key ID: 7C47D46246790496
15 changed files with 5 additions and 47 deletions

View file

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

View file

@ -3,8 +3,6 @@ use std::str::FromStr;
use aoc_2022::*;
use color_eyre::eyre::Report;
type Input = Vec<Backpack>;
type Output = i32;

View file

@ -3,8 +3,6 @@ use std::str::FromStr;
use aoc_2022::*;
use color_eyre::eyre::Report;
type Input = Vec<Assignment>;
type Output = usize;

View file

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

View file

@ -2,8 +2,6 @@ use std::collections::HashSet;
use aoc_2022::*;
use itertools::Itertools;
type Input = String;
type Output = usize;

View file

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

View file

@ -2,8 +2,6 @@ use std::{cmp::max, collections::BTreeSet};
use aoc_2022::*;
use itertools::Itertools;
type Input = Vec<Vec<i8>>;
type Output = usize;

View file

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

View file

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

View file

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

View file

@ -2,8 +2,6 @@ use std::collections::{BTreeSet, VecDeque};
use aoc_2022::*;
use itertools::Itertools;
type Input = Vec<Vec<char>>;
type Output = usize;

View file

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

View file

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

View file

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

View file

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