Skip to content

Commit e66024d

Browse files
committed
better error message
1 parent a0a9644 commit e66024d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/lean_compiler/src/a_simplify_lang.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ fn simplify_lines(
809809
} => {
810810
let function = functions
811811
.get(function_name)
812-
.expect("Function used but not defined: {function_name}");
812+
.unwrap_or_else(|| panic!("Function used but not defined: {function_name}"));
813813
if return_data.len() != function.n_returned_vars {
814814
panic!(
815815
"Expected {} returned vars in call to {function_name}",

0 commit comments

Comments
 (0)