You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lib.rs 493B

1234567891011121314151617181920212223242526272829
  1. #[macro_use]
  2. extern crate error_chain;
  3. extern crate tera;
  4. extern crate toml;
  5. error_chain! {
  6. errors {}
  7. links {
  8. Tera(tera::Error, tera::ErrorKind);
  9. }
  10. foreign_links {
  11. Io(::std::io::Error);
  12. Toml(toml::de::Error);
  13. }
  14. }
  15. // So we can use bail! in all other crates
  16. #[macro_export]
  17. macro_rules! bail {
  18. ($e:expr) => {
  19. return Err($e.into());
  20. };
  21. ($fmt:expr, $($arg:tt)+) => {
  22. return Err(format!($fmt, $($arg)+).into());
  23. };
  24. }