Skip to content

Commit

Permalink
add const FixedBitSet::new constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann authored and jrraymond committed Mar 20, 2021
1 parent ff8ddc6 commit 7b800b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ pub struct FixedBitSet {

impl FixedBitSet
{
/// Create a new empty **FixedBitSet**.
pub const fn new() -> Self
{
FixedBitSet {
data: Vec::new(),
length: 0,
}
}

/// Create a new **FixedBitSet** with a specific number of bits,
/// all initially clear.
pub fn with_capacity(bits: usize) -> Self
Expand Down

0 comments on commit 7b800b7

Please sign in to comment.