fixedbitset
                                
                                
                                
                                    fixedbitset copied to clipboard
                            
                            
                            
                        FixedBitSet<K = usize> where K: From<usize> + Into<usize>
To use it as a drop-in replacement for HashSet, it would be nice to make FixedBitSet generic over its "index", i.e. FixedBitSet<K = usize> where K: From<usize> + Into<usize>  (à la typed-index-collections).
So when you have e.g. a custom wrapper type MyId(u32) which is a HashSet<MyId>, and you know the collection is mainly dense (not  too many holes), you could very easily switch to FixedBitSet<MyId> without changing anything else in the code.
I made a PR but it's incompatible with const new(): https://github.com/rust-lang/rust/issues/57563
See PR #69
Not sure if this is a great idea due to the costs of monomorphization during compilation and the exposed generics as a part of it's type, which will need to show up in any associated type or generic type constraint. It's also possible to do this by wrapping FixedBitset in your own type as well.