Skip to content

Commit bed4877

Browse files
authored
Merge pull request RustPython#3872 from Yaminyam/change-array-iter-name
Refactor: change PyArrayIter name
2 parents d3e8e47 + b190a0c commit bed4877

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/src/array.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ mod array {
12581258

12591259
impl Iterable for PyArray {
12601260
fn iter(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult {
1261-
Ok(PyArrayIter {
1261+
Ok(PyArrayIterator {
12621262
position: AtomicUsize::new(0),
12631263
array: zelf,
12641264
}
@@ -1278,16 +1278,16 @@ mod array {
12781278
#[pyattr]
12791279
#[pyclass(name = "arrayiterator")]
12801280
#[derive(Debug, PyPayload)]
1281-
pub struct PyArrayIter {
1281+
pub struct PyArrayIterator {
12821282
position: AtomicUsize,
12831283
array: PyArrayRef,
12841284
}
12851285

12861286
#[pyimpl(with(IterNext))]
1287-
impl PyArrayIter {}
1287+
impl PyArrayIterator {}
12881288

1289-
impl IterNextIterable for PyArrayIter {}
1290-
impl IterNext for PyArrayIter {
1289+
impl IterNextIterable for PyArrayIterator {}
1290+
impl IterNext for PyArrayIterator {
12911291
fn next(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyIterReturn> {
12921292
let pos = zelf.position.fetch_add(1, atomic::Ordering::SeqCst);
12931293
let r = if let Some(item) = zelf.array.read().get(pos, vm) {

0 commit comments

Comments
 (0)