1 unstable release

0.1.1 Jul 16, 2020

#103 in #compatible

22 downloads per month

MIT license

13KB
362 lines

rust-nomvec

vector implementation from The Rustonomicon thats compatible with rust stable 1.45

Testing

$ cargo test

Using

use nomvec::NomVec;

let mut cv: NomVec<i32> = NomVec::new();
cv.insert(0, 1);
cv.insert(0, 0);
cv.push(2);
for (i, x) in cv.iter().enumerate() {
    assert_eq!(i as i32, *x);
}
assert_eq!(cv.remove(0), 0);
assert_eq!(cv.len(), 2);

No runtime deps