Skip to content

Commit

Permalink
use experimental feature
Browse files Browse the repository at this point in the history
  • Loading branch information
CJP10 committed Aug 18, 2024
1 parent 1d7b268 commit db162d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ criterion-plot = "0.5.0"
[[bench]]
name = "bench"
harness = false

[features]
experimental = []
4 changes: 2 additions & 2 deletions src/experimental.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ mod tests {

#[test]
fn empty() {
let p = Pool::<()>::from_iter(Vec::new());
let p: Pool<()> = std::iter::empty().collect();
assert_eq!(p.len(), 0);
assert_eq!(p.capacity(), 0);
assert_eq!(p.bitset.ints.len(), 1);
Expand All @@ -154,7 +154,7 @@ mod tests {

#[test]
fn pull_set_return() {
let p = Pool::from_iter(0..100usize);
let p: Pool<usize> = (0..100usize).collect();
assert_eq!(p.len(), 100);
assert_eq!(p.capacity(), 100);
assert_eq!(p.bitset.ints.len(), 2);
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ use std::mem::{forget, ManuallyDrop};
use std::ops::{Deref, DerefMut};
use std::sync::Arc;

#[cfg(feature = "experimental")]
pub mod experimental;

pub type Stack<T> = Vec<T>;
Expand Down

0 comments on commit db162d6

Please sign in to comment.