mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Simplify Optional Syntax
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
This commit is contained in:
1 parent
f6569313d7
commit
c5550cd466
1 file changed
+1
-4
@@ -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