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

Mutable indexing doesn't seem to work #278

Open
nazar-pc opened this issue Sep 4, 2024 · 0 comments
Open

Mutable indexing doesn't seem to work #278

nazar-pc opened this issue Sep 4, 2024 · 0 comments

Comments

@nazar-pc
Copy link

nazar-pc commented Sep 4, 2024

I use BitArray<[u8; _]> as a container and then trying to index into it.

Immutable indexing to return &bool works just fine, but attempt to return &mut bool fails:

218 |         &mut self.encoded_record_chunks_used[index]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot borrow as mutable
    |
    = help: trait `IndexMut` is required to modify indexed content, but it is not implemented for `bitvec::array::BitArray<[u8; 8192]>`

Not sure what the reason of this is, but it is unexpected for sure.

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

No branches or pull requests

1 participant