Simplify Optional Syntax

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
This commit is contained in:
Hunter HarloffandJeong, YunWon authored and Jeong YunWon committed 2024-04-06 19:14:58 +09:00
1 parent f6569313d7
commit c5550cd466
1 file changed
+1 -4
+1 -4
View File
@@ -1986,10 +1986,7 @@ mod decl {
return Err(vm.new_value_error("n must be at least one".to_owned()));
}
let n = n.to_usize().unwrap();
let iterable = match iterable_ref.get_iter(vm) {
Ok(it) => it,
Err(e) => return Err(e),
};
let iterable = iterable_ref.get_iter(vm)?;
Self {
iterable,