wec

Crates.iowec
lib.rswec
version1.0.2
sourcesrc
created_at2023-05-13 17:11:10.509248
updated_at2023-05-13 17:47:39.100691
descriptionUseful vec!-like macros
homepage
repositoryhttps://github.com/MariaSolOs/wec
max_upload_size
id863827
size5,491
Maria José Solano (MariaSolOs)

documentation

https://docs.rs/wec

README

WEC

A collection of useful Rust macros for creating vec!s.

bec!

Tired of writing vec![ Box::new(1), ... Box::new(100) ]? Me too. So here's macro that does it for you.

let v = bec![1, 2, 3];
assert_eq!(v, vec![Box::new(1), Box::new(2), Box::new(3)]);

vinto!

Calls .into() on each element.

let v: Vec<String> = vinto!["foo", String::from("bar")];
assert_eq!(v, vec![String::from("foo"), String::from("bar")]);
Commit count: 4

cargo fmt