summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-03-05 19:19:21 +0100
committerNadrieril2019-03-05 19:19:21 +0100
commite34e90284968fbde5a7d5129ee87ef785a94ffe8 (patch)
tree26ac42d46fd72c1478fc9ca1135b89774e100dcc /dhall
parentf46a205e2bde91bebd16ed7ebccbb3f203c4779e (diff)
Fix error handling in macros
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhall/src/parser.rs b/dhall/src/parser.rs
index 936f577..8322270 100644
--- a/dhall/src/parser.rs
+++ b/dhall/src/parser.rs
@@ -214,7 +214,7 @@ macro_rules! match_iter_typed {
(@collect, ($iter:expr, $body:expr, $callback:ident, $error:ident), ($($args:tt)*), ($($acc:tt)*), ($(,)*)) => {
match_iter!($iter; ($($acc)*) => {
match_iter_typed!(@callback, $callback, $iter, $($args)*);
- Ok($body)
+ $body
})
};
@@ -312,7 +312,7 @@ macro_rules! match_iter_branching {
let matched: Result<_, IterMatchError<_>> = $callback!(@branch_callback, $submac, iter.clone(); ($($args)*) => $body);
#[allow(unused_assignments)]
match matched {
- Ok(v) => break v,
+ Ok(v) => break Ok(v),
Err(e) => last_error = e,
};
)*