arraydeque icon indicating copy to clipboard operation
arraydeque copied to clipboard

Use const generics instead of `generic-array`

Open YuhanLiin opened this issue 3 years ago • 2 comments

Now that Rust supports const generics, ArrayDeque should take the capacity as a type parameter rather than an array type. This prevents the deque from using smaller index types, but that isn't a big drawback in practice. ArrayVec is already using const generics, and their array index is set to u32.

YuhanLiin avatar Apr 19 '22 14:04 YuhanLiin

@andylokandy I would also benefit from the implementation of Array for [T; CONST_GENERIC].

elpiel avatar Jun 13 '22 18:06 elpiel

It's a good idea to migrate to const generic at this time, but the other projects has occupied me too much time right now. For anyone interested, pull requests are always welcome!

andylokandy avatar Jun 14 '22 17:06 andylokandy