lessvec
A minimal, educational Vec-like collection implemented with only the Rust standard library.
Quick example
use LessVec;
let mut v = new;
v.push;
v.push;
assert_eq!;
Prelude & macro
lessvec exposes a small prelude with the LessVec type and the lessvec! macro:
use *;
// macro to construct a LessVec (same syntax as std `vec!`)
let v = lessvec!;
assert_eq!;
// repeating element form (requires Clone)
let r = lessvec!;
assert_eq!;
You can also import the macro directly if you prefer:
use lessvec;
let v = lessvec!;
Running the included example
The repository includes an example at examples/basics.rs. Run it with:
You can run the test suite with: