Make BBBuffer generic over the index variables
jamesmunns opened this issue · comments
It would be nice to use atomic types smaller than usize
for tracking variables. This could be a significant size savings for buffers like BBBuffer<U128>
(18 bytes vs 6 bytes overhead on a 32-bit target).
This should be possible by following the tricks used by heapless
, and could be made backwards compatible to alias current constructors to use usize
as the generic parameter.
This would also help in making this mergable into heapless, CC rust-embedded/heapless#65
CC @korken89, who I think is better at generic shenanigans that I am :)
Yeah, this is no problem to do, ping me if you want some help :)