advent-of-code/aoc/src/lib.rs

7 lines
198 B
Rust
Raw Normal View History

2019-12-01 22:22:12 +01:00
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),+)))
}