Skip to content

Commit

Permalink
[hamming] Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pczarn committed May 31, 2024
1 parent 38cc9ca commit 56c55f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,10 @@ impl<B: BitBlock> BitVec<B> {
self.ensure_invariant();
// Add the number of zeros of each block.
let extra_zeros = (B::bits() - (self.len() % B::bits())) % B::bits();
self.blocks().map(|elem| elem.count_zeros() as u64).sum::<u64>() - extra_zeros as u64
self.blocks()
.map(|elem| elem.count_zeros() as u64)
.sum::<u64>()
- extra_zeros as u64
}

/// Returns an iterator over the elements of the vector in order.
Expand Down

0 comments on commit 56c55f3

Please sign in to comment.