use aoc crate for common stuff
This commit is contained in:
parent
907e883d48
commit
64410f0042
18 changed files with 49 additions and 28 deletions
9
aoc/Cargo.toml
Normal file
9
aoc/Cargo.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
name = "aoc"
|
||||
version = "0.1.0"
|
||||
authors = ["Antoine Martin <antoine97.martin@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
6
aoc/src/lib.rs
Normal file
6
aoc/src/lib.rs
Normal 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),+)))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue