#fill #array #allowing #expression #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

#483 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

~260–710KB
~17K SLoC