Open kzhui125 opened 7 months ago
use tinyvec::tiny_vec; #[derive(Debug)] pub struct Point { id1: i32, } impl Default for Point { fn default() -> Self { Self { id1: 0 } } } fn main() { let arr = tiny_vec!([Point; 1] => Point { id1: 1 }); dbg!(arr); let arr = vec![Point { id1: 1 }]; dbg!(arr); }
let arr: TinyVec<[char; 10]> = tiny_vec!(); dbg!(arr); let arr: Vec<char> = vec![]; dbg!(arr);