From e34e90284968fbde5a7d5129ee87ef785a94ffe8 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 5 Mar 2019 19:19:21 +0100 Subject: Fix error handling in macros --- dhall/src/parser.rs | 4 ++-- 1 file 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, }; )* -- cgit v1.2.3