Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ impl<T: UnsignedInteger> GenericBitSet<T> {
self.layer3 = T::ZERO;
}

/// Returns true if this `BitSet` contains nothing, and false otherwise.
pub fn is_empty(&self) -> bool {
self.layer3 == T::ZERO
}

/// How many bits are in a `usize`.
///
/// This value can be trivially determined. It is provided here as a constant for clarity.
Expand Down Expand Up @@ -423,11 +428,6 @@ pub trait BitSetLike {
}
}

/// Returns true if this `BitSetLike` contains nothing, and false otherwise.
fn is_empty(&self) -> bool {
self.layer3() == Self::Underlying::ZERO
}

/// Return a `usize` where each bit represents if any word in layer2
/// has been set.
fn layer3(&self) -> Self::Underlying;
Expand Down