Open
Description
As it stands, this crate appears to make separate fields each with their own Vec
. This would duplicate the length and capacity values for each field. This may not be a huge problem, but it would triple the size of the struct as it grows and can lead to the different Vec
s falling out of sync.
The main alternative would be to use unsafe
and raw pointers (or NonNull
pointers). That said, managing the unsafe
would almost certainly be more effort than keeping the Vec
s in sync. Regardless, I think this could be a useful discussion to be had. Is cutting the struct to a third worth having unsafe
code to vet? (probably not)
Metadata
Metadata
Assignees
Labels
No labels