mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-29 20:20:59 +03:00
d808d28452
Clear `ChunkedBitSet` without reallocating There doesn't appear to be any reason to clear a ChunkedBitSet via its constructor (which allocates a new list of chunks), when we could just fill the existing allocation with `Chunk::Zeros` instead. For comparison, the `insert_all` impl added by the same PR (rust-lang/rust#93984) does the simple thing here and just overwrites every chunk with `Chunk::Ones`. (That fill was then made somewhat easier by rust-lang/rust#145480, which removes the chunk size from all-zero/all-one chunks.) r? nnethercote (or compiler)