#fill #array #allowing #expression #macro

macro fill-array

A rust macro allowing to fill arrays with an expression

3 unstable releases

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

#439 in Procedural macros

23 downloads per month

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

~340–800KB
~19K SLoC