Skip to content

Instantly share code, notes, and snippets.

@bgamari
bgamari / linked_list.rs
Last active July 16, 2017 14:05
An intrusive linked-list implementation in Rust
/*!
* Intrusive singly linked lists
*/
use std::option::{Option, Some, None};
use std::cell::{Cell};
#[deriving(Show)]
pub struct ListCell<'a, T>(Cell<Option<&'a T>>);