summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2014-11-26 22:00:35 -0500
committerAndrew Gallant <jamslam@gmail.com>2014-11-26 22:00:35 -0500
commited5325f19e30d390ee6238c76977caa69742fe31 (patch)
tree0a9a5f8a635f5b2efd94e367f34f00243dbc0d10 /src/main.rs
parent2ec82e8fa258baa7e86d8c77c26d1f572656b8ef (diff)
Use a `fail!` macro, which is just `Err(FromError::from_error(...))`.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 11f34cc..e3c6bec 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -27,6 +27,10 @@ macro_rules! werr(
)
)
+macro_rules! fail(
+ ($e:expr) => (Err(::std::error::FromError::from_error($e)));
+)
+
macro_rules! command_list(
() => (
"