We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems the double ended iterator is not behaving as expected.
It is important to note that both back and forth work on the same range, and do not cross: iteration is over when they meet in the middle. https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html
There should be two pointers one pointing to the position at the beginning and one at the end.
The code moves the one pointer instead. Next back should move the later and keep the pointer used in next untouched.
ext-php-rs/src/types/array.rs
Lines 688 to 728 in 8985cb2
If i have [1, 2, 3, 4, 5] - next() should return 1 and next_back() 5
[1, 2, 3, 4, 5]
next()
1
next_back()
5
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It seems the double ended iterator is not behaving as expected.
There should be two pointers one pointing to the position at the beginning and one at the end.
The code moves the one pointer instead. Next back should move the later and keep the pointer used in next untouched.
ext-php-rs/src/types/array.rs
Lines 688 to 728 in 8985cb2
If i have
[1, 2, 3, 4, 5]
-next()
should return1
andnext_back()
5
The text was updated successfully, but these errors were encountered: