aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-12 02:16:27 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-12 02:16:27 +0100
commit3c92e88164db6a94177fb4adeb18c80dffc377e4 (patch)
treec2fdefbe04901df614a9753093d146f424d42a9c /src/main.rs
parenta6afa81d1d9f2dd7d10fe7c0555ae8a8a6d84867 (diff)
downloadkondou-3c92e88164db6a94177fb4adeb18c80dffc377e4.tar.gz
kondou-3c92e88164db6a94177fb4adeb18c80dffc377e4.tar.bz2
kondou-3c92e88164db6a94177fb4adeb18c80dffc377e4.zip
remove quick_error
quick_error used the deprecated Error::cause interface, therefore we want to use our own error enums with proper methods.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 181d64a..55afb00 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,13 +11,23 @@ extern crate rusttype;
extern crate termcolor;
extern crate xdg;
#[macro_use]
-extern crate quick_error;
-#[macro_use]
extern crate lazy_static;
use std::error::Error as StdError;
use std::fmt;
+macro_rules! error_froms {
+ ($tname:ty, $($ename:ident : $fty:ty => $res:expr,)*) => {
+ $(
+ impl From<$fty> for $tname {
+ fn from($ename: $fty) -> Self {
+ $res
+ }
+ }
+ )*
+ }
+}
+
mod api;
mod bt;
mod cache;