mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Simplify Optional Syntax
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
This commit is contained in:
committed by
Jeong YunWon
parent
f6569313d7
commit
c5550cd466
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user