1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! A collection of useful Rust macros for creating `vec!`s.
/// Boxes each element in the vector.
///
/// # Examples
/// ```
/// use wec::bec;
///
/// let v = bec![1, 2, 3];
/// assert_eq!(v, vec![Box::new(1), Box::new(2), Box::new(3)]);
/// ```
/// Calls `.into()` on each element in the vector.
///
/// # Examples
/// ```
/// use wec::vinto;
///
/// let v: Vec<String> = vinto!["foo", String::from("bar")];
/// assert_eq!(v, vec![String::from("foo"), String::from("bar")]);
/// ```