use aoc crate for common stuff

This commit is contained in:
Antoine Martin 2019-12-01 22:22:12 +01:00
parent 907e883d48
commit 64410f0042
18 changed files with 49 additions and 28 deletions

6
aoc/src/lib.rs Normal file
View file

@ -0,0 +1,6 @@
pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
#[macro_export]
macro_rules! err {
($($string:expr),+) => (Box::<dyn std::error::Error>::from(format!($($string),+)))
}