diff --git a/stdlib/src/array.rs b/stdlib/src/array.rs index 2c31b7351..ff4ba2918 100644 --- a/stdlib/src/array.rs +++ b/stdlib/src/array.rs @@ -1301,12 +1301,12 @@ mod array { impl IterNextIterable for PyArrayIter {} impl IterNext for PyArrayIter { fn next(zelf: &Py, vm: &VirtualMachine) -> PyResult { - zelf.internal.lock().next(|array, pos| { - Ok(match array.read().get(pos, vm) { + zelf.internal.lock().next(|array, pos| { + Ok(match array.read().get(pos, vm) { Some(item) => PyIterReturn::Return(item?), None => PyIterReturn::StopIteration(None), }) - }) + }) } }