diff --git a/procs/src/lib.rs b/procs/src/lib.rs index 4f227b7..d6d2147 100644 --- a/procs/src/lib.rs +++ b/procs/src/lib.rs @@ -253,7 +253,12 @@ fn generic_one_for_macro( let #after_take_id = $expr; let _closure = $closure; let (after_take, res) = #block; - res.and_then(|x| Some(after_take.merge(x))) + if let Some(res) = res { + Ok(after_take.merge(res)) + } else { + Err(after_take) + } + } }; }