Skip to content

v1.2.3

Latest

Choose a tag to compare

@gammazero gammazero released this 31 Oct 00:41
· 2 commits to main since this release
534ab85

v1.2.3

Fixed

  • Iter and RIter now panic when Clear is 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)
  • Iter and RIter on a nil deque now yield nothing instead of panicking with a nil pointer dereference. (#65)

Documentation

  • The Iter and RIter docs 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, or Clear followed 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