Add support for arrays powered by const generics without unsafe or libs#311
Add support for arrays powered by const generics without unsafe or libs#311Mathspy wants to merge 2 commits into
Conversation
Heavily based on the tuples and vectors tests
|
I was looking to add this as well and came up with exactly the same implementation before seeing there was already a PR. Would be nice to see this get in. |
|
FWIW I've published a fork of this library called It includes this change as well as a bunch of others that made sense to include. |
|
closing as #319 was merged |
|
Looks like the other PR doesn’t handle shrinking |
|
🤦 You're absolutely correct. Mind opening a PR for adding shrinking to the now-existing implementation? If you'd rather I can copy over your code myself. |
Opened #330 Thank you for taking over maintenance of the library! |
Closes #187
Alternative to #282 that does not use
unsafeThis seems to have been a heavily requested feature since 2017 now but the hold back was that implementing array support via macros heavily impacts compile times, is limited to some predefined arbitrary length and bloats the docs with unnecessary clutters. The wait was for const generic stabilization which is finally upon us, so we can utilize that and add array support!
Also lol while I was writing the shrink implementation I was like uff too much cloning there's probably a way to write this better that Sushi will tell me about, then while opening this PR I decided to double check there are no PRs open that already do this, which is when I found #282 and saw the exact same implementation I reached. Now I feel much less bad about the implementation