4 ms·
The other commenters to this are correct, `Vec::new()` doesn't actually allocate so the code in the book is fine. I had a brain fart. If that function was taki
by weavie 3y ago
The other commenters to this are correct, `Vec::new()` doesn't actually allocate so the code in the book is fine. I had a brain fart.
If that function was taking a reference to an object that was fairly expensive to create a default value for then my conundrum would still exist.