Skip to content

Commit

Permalink
fix: correct doc test for Bitset::minimum to match new behavior
Browse files Browse the repository at this point in the history
Dr-Emann committed Dec 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent cda0656 commit 8090731
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion croaring/Cargo.toml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ roaring = "0.10"
criterion = { version = "0.5", features = ["html_reports"] }

[dependencies]
ffi = { package = "croaring-sys", path = "../croaring-sys", version = "4.1.4" }
ffi = { package = "croaring-sys", path = "../croaring-sys", version = "4.2.1" }

[[bench]]
name = "benches"
4 changes: 2 additions & 2 deletions croaring/src/bitset/imp.rs
Original file line number Diff line number Diff line change
@@ -278,14 +278,14 @@ impl Bitset {
unsafe { ffi::bitset_count(&self.bitset) }
}

/// Index of the first set bit, or zero if the bitset has no set bits
/// Index of the first set bit, or usize::MAX if the bitset has no set bits
///
/// # Examples
/// ```
/// use croaring::Bitset;
/// let mut bitset = Bitset::new();
/// // minimum returns 0 if the bitset is empty
/// assert_eq!(bitset.minimum(), 0);
/// assert_eq!(bitset.minimum(), usize::MAX);
/// bitset.set(100);
/// assert_eq!(bitset.minimum(), 100);
/// ```

0 comments on commit 8090731

Please sign in to comment.