26 releases (6 breaking)

0.7.3 May 25, 2023
0.6.8 May 22, 2023

#2008 in Data structures

MIT license

24KB
500 lines

cons-rs

A crate containing a singly-linked list.

As of 0.4.1, cons-rs supports #[no_std] environments. Note that it still depends on the alloc crate.

Breaking Update Changelog

0.7.0

This version locks the entire immutable module behind a crate feature.

It also flips the Extend and IntoIterator implementations, so creating a list from [1, 2] and popping off of it will yield 1 and then 2.

0.6.0

This version is a full rewrite of the entire crate. It has migrated from its past as a "list of nested pairs" to what it has actually been the entire time, a singly-linked list.

The main reason I didn't publish this as a new crate is because all the names are taken, and the use cases are mostly the same.


lib.rs:

A crate that contains a singly linked list.

Note: This is different from the standard LinkedList, which is doubly linked.

No runtime deps

Features