the current length/capacity model is becoming hard to maintain and understand leading to strange miri provenance bugs #406
what we need conceptually is:
TaggedLen: Copy -> [onheap:1][length:63]
- default() -> Self
- new(bool, usize) -> Self
- length(self) -> usize
- onheap(self) -> bool
- get(self) -> (bool, usize)
- resize(&mut self, usize) -> ()
- relocate(&mut self, bool) -> ()
- update(&mut self, bool, usize) -> ()
and no additional methods like set_len on SmallVec
currently set_len depends on capacity its downstream methods, so this is not a simple refactor
the sketch above is just a concept
the current length/capacity model is becoming hard to maintain and understand leading to strange miri provenance bugs #406
what we need conceptually is:
and no additional methods like
set_lenonSmallVeccurrently
set_lendepends oncapacityits downstream methods, so this is not a simple refactorthe sketch above is just a concept