FixedBitSet<K = usize> where K: From<usize> + Into<usize>
Here's a proof-of-concept. I've kept size arguments (in len(), with_capacity() and grow()) as usize to keep with the spirit of typed-index-collections and to be able to use it as a drop-in replacement for HashSet.
The only roadblock I have stumbled on is that new() still can be const for now.
Thanks for the contribution! I'll take a closer look later. Backwards compatibility is important so new no longer being const is definitely a blocker.
That's what I thought. It's probably better to wait that this particular issue is fixed. In the interim I made a separate crate (which is just a fork of yours with my PR applied): https://lib.rs/crates/tibitset