Skip to content

Commit c5550cd

Browse files
Popproyouknowone
andcommitted
Simplify Optional Syntax
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
1 parent f656931 commit c5550cd

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎vm/src/stdlib/itertools.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,10 +1986,7 @@ mod decl {
19861986
return Err(vm.new_value_error("n must be at least one".to_owned()));
19871987
}
19881988
let n = n.to_usize().unwrap();
1989-
let iterable = match iterable_ref.get_iter(vm) {
1990-
Ok(it) => it,
1991-
Err(e) => return Err(e),
1992-
};
1989+
let iterable = iterable_ref.get_iter(vm)?;
19931990

19941991
Self {
19951992
iterable,

0 commit comments

Comments
 (0)