Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend from within fix #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

None yet

1 participant