You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bounds on the by argument for the methods BitSlice::shift_start and BitSlice::shift_end are incorrectly documented.
The documentation states that "This panics if by is not less than self.len()." when in fact it should be "less than or equal", as stated correctly just above.
The assert message has the same error.
The following program shows clearly what the actual behaviour is
use bitvec::array::BitArray;
fn main() {
let mut array = BitArray::<u8>::new(52);
print!("{:?}", array);
let len = array.len();
array.shift_left(len);
println!("{:?}", array);
}
The bounds on the
by
argument for the methodsBitSlice::shift_start
andBitSlice::shift_end
are incorrectly documented.The documentation states that "This panics if
by
is not less thanself.len()
." when in fact it should be "less than or equal", as stated correctly just above.The assert message has the same error.
The following program shows clearly what the actual behaviour is
I've created PR #251 to fix this
The text was updated successfully, but these errors were encountered: