let v = fixedbitset::FixedBitSet::with_capacity(512usize);
println!("{}", v.count_ones(..));
Expected behavior: Print 0
Actual behavior: panic:
~/workspace/mincounter_fixedbitset$ RUST_BACKTRACE=1 cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/mincounter_fixedbitset`
thread 'main' panicked at 'index out of bounds: the len is 16 but the index is 16', /checkout/src/libcollections/vec.rs:1401
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: <collections::vec::Vec<T> as core::ops::Index<usize>>::index
at /checkout/src/libcollections/vec.rs:1401
1: fixedbitset::FixedBitSet::count_ones
at .../.cargo/registry/src/github.com-1ecc6299db9ec823/fixedbitset-0.1.5/src/lib.rs:168
As far as I can see, I already use the newest version.
Minimal reproducing example (runnable version):
Expected behavior: Print
0
Actual behavior: panic:As far as I can see, I already use the newest version.