Skip to content

Commit

Permalink
Restore debug impl
Browse files Browse the repository at this point in the history
  • Loading branch information
wyhaya committed Jul 1, 2024
1 parent 82e996f commit d6928a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,10 +1708,10 @@ impl<B: BitBlock> fmt::Display for BitVec<B> {
impl<B: BitBlock> fmt::Debug for BitVec<B> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
self.ensure_invariant();
fmt.debug_struct("BitVec")
.field("storage", &format_args!("{}", self))
.field("nbits", &self.nbits)
.finish()
for bit in self {
write!(fmt, "{}", if bit { 1 } else { 0 })?;
}
Ok(())
}
}

Expand Down

0 comments on commit d6928a2

Please sign in to comment.