Macro code_spells::capacious_extremis
source · macro_rules! capacious_extremis { (&mut $vec:ident, $capacity:expr) => { ... }; ($vec:ident, $capacity:expr) => { ... }; }
Expand description
Alias for Vec::reserve
.
Example
let mut police_box = Vec::<i32>::new();
capacious_extremis!(&mut police_box, 5);
assert!(police_box.capacity() >= 5);
let r = &mut police_box;
capacious_extremis!(r, 10);
assert!(police_box.capacity() >= 10);