diff options
Diffstat (limited to 'src/ast.rs')
-rw-r--r-- | src/ast.rs | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -803,15 +803,16 @@ fn step( } let step = step.unwrap(); - let m = bindings.find(&step); - if m.is_none() { - eprintln!("Could not finding binding for: {}", text); - return ( - error_msg(&format!("Could not find binding for: {}", text)), - defkind, - ); - } - let m = m.unwrap(); + let m = match bindings.find(&step) { + Ok(m) => m, + Err(e) => { + eprintln!("Could not select binding: {:?}", e); + return ( + error_msg(&format!("Could not select binding for: {}", text)), + defkind, + ); + } + }; let mut inlines = Vec::new(); |