Skip to content

Releases: JP-Ellis/rust-skiplist

Release list

v1.1.0

Choose a tag to compare

@jp-ellis-bot jp-ellis-bot released this 14 Mar 21:51

🚀 Features

  • Add seeded constructor

🐛 Bug Fixes

  • Unable to create upper bound
  • Two off-by-one errors

📚 Documentation

  • Fix p/q confusion

🧪 Testing

  • Add structural snapshots

⚙️ Miscellaneous Tasks

  • Fold cliff config into release-plz
  • Remove output from cliff config
  • (ci) Test doc examples
  • (ci) Run tests on ready for review

v1.0.0

Choose a tag to compare

@jp-ellis-bot jp-ellis-bot released this 10 Mar 23:29

Important

This release shares little code with the 0.x series. The internal architecture, public API, and crate structure have all changed. If you are upgrading from 0.x, treat this as a new dependency and review the documentation from scratch rather than diffing against the old API.

Version 1.0.0 introduces four skip-list collections, each targeting a familiar stdlib analogue:

  • SkipList<T>: insertion-order positional sequence analogous to Vec/VecDeque, offering O(log n) insert, remove, and indexed access at any position without element shifting.
  • OrderedSkipList<T, C>: always-sorted bag that, unlike BTreeSet, keeps duplicate values adjacent in the list.
  • SkipSet<T, C>: mirrors BTreeSet with sorted, unique values and set-algebra operations.
  • SkipMap<K, V, C>: mirrors BTreeMap with sorted unique key-value pairs.

See docs.rs for the full API.

All three ordered collections are parameterised by C: Comparator<T> rather than requiring T: Ord on the struct itself.

  • OrdComparator: zero-sized, delegates to T: Ord; the default for all three types.
  • FnComparator<F>: wraps any Fn(&T, &T) -> Ordering closure; no newtype needed for custom orderings.
  • PartialOrdComparator: behind the partial-ord feature flag; panics if a comparison returns None (e.g. NaN). For float keys, FnComparator(f64::total_cmp) is the safer alternative.

The node layer has been rewritten to use NonNull<Node<T, N>> throughout, replacing the raw *mut pointers of the 0.x series. This aligns the unsafe internals with Rust's pointer-provenance model, allows the full test suite to pass under Miri with Tree Borrows, and substantially reduces the volume of unsafe code.