1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#![allow(dead_code)] use generic_new::GenericNew; #[derive(GenericNew)] struct Foo { bar: Vec<String>, } #[derive(GenericNew)] struct FooTup(Vec<String>); fn main() { Foo::new(["hello", "world"]); FooTup::new(["a", "b", "c"]); }