cdll 0.6.0

A circular doubly linked list
Documentation

Circular Doubly Linked List written in rust

crate docs

Inspired from the linux kernel list.

Disclaimer

Do not use before v0.5 as it was unsound ! This is a rewrite. The new developpement is test driven and miri-checked before commit.

Basic usage

use cdll::{list, CircularList};

let mut list = list![1, 2, 3];
list.push_back(4);

assert_eq!(list, list![1, 2, 3, 4]);
assert_eq!(list.pop_front(), Some(1));

my_list.iter_mut().for_each(|x: &mut i32| *x -= 1);
assert_eq!(my_list.into_iter().collect::<Vec<i32>>(), &[1, 2, 3]);