optimize bitvec test
@@ -31,15 +31,14 @@ const MAX_BUCKETS: usize = 32;
/// * A position can set more than once -- it remains set after the first time.
///
/// # Examples:
-/// ```ignore
/// let mut bv = BitVec::default();
/// bv.set(2);
/// bv.set(5);
/// assert!(bv.is_set(2));
/// assert!(bv.is_set(5));
/// assert_eq!(false, bv.is_set(0));
-/// assert_eq!(bv1.count_ones(), 2);
-/// assert_eq!(bv1.last_set_bit(), 3);
+/// assert_eq!(bv.count_ones(), 2);
+/// assert_eq!(bv.last_set_bit(), 5);
///
/// // A bitwise AND of BitVec can be performed by using the `&` operator.
/// let mut bv1 = BitVec::default();
@@ -219,7 +218,7 @@ mod test {
#[test]
fn test_empty() {
let p = BitVec::default();
- for i in 0..std::u8::MAX {
+ for i in 0..=std::u8::MAX {
assert_eq!(false, p.is_set(i));
}
}
