c19e900bec
This removes the dependency cycle between config and rendering that causes 4 packages to be recompiled every time a change is made. I just want to code fast!
31 lines
523 B
Rust
Executable file
31 lines
523 B
Rust
Executable file
#![allow(unused_doc_comment)]
|
|
|
|
#[macro_use]
|
|
extern crate error_chain;
|
|
extern crate tera;
|
|
extern crate toml;
|
|
|
|
error_chain! {
|
|
errors {}
|
|
|
|
links {
|
|
Tera(tera::Error, tera::ErrorKind);
|
|
}
|
|
|
|
foreign_links {
|
|
Io(::std::io::Error);
|
|
Toml(toml::de::Error);
|
|
}
|
|
}
|
|
|
|
// So we can use bail! in all other crates
|
|
#[macro_export]
|
|
macro_rules! bail {
|
|
($e:expr) => {
|
|
return Err($e.into());
|
|
};
|
|
($fmt:expr, $($arg:tt)+) => {
|
|
return Err(format!($fmt, $($arg)+).into());
|
|
};
|
|
}
|