|
|
|
|
|
by aatd86
996 days ago
|
|
The generic function is cloning a slice so you need to allocate a new backing array. (think deep-copy) Here that's just a one-liner that works. I need to check but I think that if you need to keep the same capacity, you may want to preallocate manually. |
|