#fill #expression #array #allowing #macro

macro fill-array

A rust macro allowing to fill arrays with an expression

3 unstable releases

0.2.1 Apr 15, 2024
0.2.0 Apr 15, 2024
0.1.0 Nov 4, 2023

#521 in Procedural macros

MIT license

4KB
60 lines

Fill Array

Usage

#[macro_use]
extern crate fill_array;

pub fn main() {
    fill![Vec::new(); 3]
}

Output

#[macro_use]
extern crate fill_array;

pub fn main() {
    [Vec::new(), Vec::new(), Vec::new()]
}

Dependencies

~250–700KB
~17K SLoC