8000 Simplify Optional Syntax · RustPython/RustPython@adafea1 · GitHub
[go: up one dir, main page]

Skip to content

Commit adafea1

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

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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)
0