orx-pinned-vec 4.1.0

`PinnedVec` trait defines the interface for vectors which guarantee that elements added to the vector are pinned to their memory locations unless explicitly changed.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::pinned_vec_tests::testvec::FixedCapVec;
use crate::*;

#[test]
fn is_empty() {
    let mut vec = FixedCapVec::new(5);
    assert!(vec.is_empty());

    vec.push(1);
    assert!(!vec.is_empty());

    vec.push(2);
    vec.push(3);
    assert!(!vec.is_empty());

    vec.clear();
    assert!(vec.is_empty());
}