bitvec icon indicating copy to clipboard operation
bitvec copied to clipboard

Mutable indexing doesn't seem to work

Open nazar-pc opened this issue 1 year ago • 3 comments

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.

nazar-pc avatar Sep 04 '24 08:09 nazar-pc