2 ms·
There's also another solution to use slices instead of 'embedded arrays', but with slices you suddenly need to think about ownership (e.g. what happens with the
by flohofwoe 3y ago
There's also another solution to use slices instead of 'embedded arrays', but with slices you suddenly need to think about ownership (e.g. what happens with the referenced slices when the top-level struct is copied).
- anonymoushn 3y agoI agree that it's worth avoiding slice members for this reason if the slices are the only thing that would stop memcpy'd copies of the struct from "just working."