bitvec icon indicating copy to clipboard operation
bitvec copied to clipboard

Extend from within fix

Open lucasallison opened this issue 2 years ago • 0 comments
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.

lucasallison avatar Nov 07 '23 12:11 lucasallison