Re:Rust 1.43
by cesarb on Thursday April 23, 2020 @01:22PM
(#22958378)
Just nitpicking, but a better explanation of the expansion of `vec![1,2]` would use `Vec::with_capacity(2)` instead of `Vec::new()`, that is, it already allocates the Vec with the correct capacity (the real expansion uses in-place construction of a boxed slice, but the effect is similar).
[ Parent
| on HN ]
There are no comments on this comment yet.