bitvec
bitvec copied to clipboard
Extend from within fix
trafficstars
Changed the assert_within_bounds in the extend_from_within function to allow ranges that include the last element of the vector.
Currently when calling ranges that include the the last element of the bit vector the code panics, for example:
let mut b = bitvec![0; 2];
b.extend_from_within(..);
Yields:
thread 'main' panicked at 'index 2 out of range: Excluded(2)
Editing the range in the assert will not panic on such ranges.