You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't allocate on the heap for empty bit sets (#10495)
This commit fixes an issue where `CompoundBitSet::with_capacity(0)`
would end up allocation space on the heap due to an off-by-one in the
implementation. When calculating the maximum bit that might be set the
implementation now subtracts one. This more accurately models the
maximum bit that could be set and additionally guarantees the property
that `with_capacity(0)` does not allocate anything on the heap.
0 commit comments