Skip to content

Commit

Permalink
Update bitset.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Micha Reiser <micha@reiser.io>
  • Loading branch information
carljm and MichaReiser committed Sep 12, 2024
1 parent 13a3ff3 commit cd922ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ impl<const B: usize> BitSet<B> {
self.resize_blocks(max_len);
}
let other_blocks = other.blocks();
for (i, my_block) in self.blocks_mut().iter_mut().enumerate() {
*my_block |= other_blocks.get(i).unwrap_or(&0);
for (my_block, other_block) in self.blocks_mut().iter_mut().zip(other_blocks) {
*my_block |= other_block
}
}

Expand Down

0 comments on commit cd922ff

Please sign in to comment.