Macro tinyvec

Source
macro_rules! tinyvec {
    (@one $e:expr) => { ... };
    () => { ... };
    ($elem:expr; $n:expr) => { ... };
    ($($x:expr),+ $(,)?) => { ... };
}
Expand description

Macro to create TinyVecs

ยงExample

use tiny_vec::{TinyVec, tinyvec};

// Create a TinyVec with a list of elements
let v: TinyVec<_, 10> = tinyvec![1, 2, 3, 4];
assert_eq!(&v[0..4], &[1, 2, 3, 4]);

// Create a TinyVec with 100 zeroes
let v: TinyVec<_, 10> = tinyvec![0; 100];
assert_eq!(v[20], 0);