3 ms·
let heap_value = vec![the_struct]; Based on another comment addressing this, I don't think the original commentor was making assumptions about the shape of you
by sli 4y ago
let heap_value = vec![the_struct];
Based on another comment addressing this, I don't think the original commentor was making assumptions about the shape of your data.
- klodolph 4y agoThis doesn’t actually work, it will still overflow the stack. The vec! macro will just copy its arguments into the heap; the arguments are still on the stack to begin with.