Crate nonempty[][src]

Expand description

A Non-empty growable vector.

Examples

use nonempty::NonEmpty;

let mut l = NonEmpty { head: 42, tail: vec![36, 58] };

assert_eq!(l.head, 42);

l.push(9001);

assert_eq!(l.last(), &9001);

let v: Vec<i32> = l.into();
assert_eq!(v, vec![42, 36, 58, 9001]);

Structs

NonEmpty