Repository navigation
v1.2.3
Fixed
IterandRIternow panic whenClearis called during iteration of a deque whose head and tail stay the same, such as a full deque with head at 0. Previously, iteration continued and yielded zero values. (#65)IterandRIteron a nil deque now yield nothing instead of panicking with a nil pointer dereference. (#65)
Documentation
- The
IterandRIterdocs now describe exactly what is detected during iteration. (#66)- Advancing to the next item panics if the loop body left the deque with a different head, tail, or item count.
- Changes made before breaking out of the loop, or while handling the last item, are not detected, since no further item is read.
- Changes that leave head, tail, and item count the same are allowed, such as
Set,Swap, a push followed by a pop at the same end, orClearfollowed by re-pushing the same number of items. If such a change replaces items, later iterations yield the new values.
- Fixed typos in the docs and README. (#67)
Tests
- Added tests for changes made during iteration, including which changes panic and which are allowed. (#66)
Full Changelog: v1.2.2...v1.2.3