Skip to content

Conversation

@lucasallison
Copy link

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.

…on to allow ranges that include the last element of the vector.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant