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

no len()? #1

Closed
ekmett opened this issue Aug 6, 2022 · 1 comment
Closed

no len()? #1

ekmett opened this issue Aug 6, 2022 · 1 comment

Comments

@ekmett
Copy link

ekmett commented Aug 6, 2022

is it just me or is there no way for a user to query for the value of nbits to know the length of a bitvector produced with this api?

@ekmett
Copy link
Author

ekmett commented Aug 6, 2022

Nevermind, it seems nbits is exported as capacity.

I was expecting capacity to be the size of the backing array * block size, (e.g. how much we can grow without reallocation) not the number of bits past which they are treated as None on retrieval.

@ekmett ekmett closed this as completed Aug 6, 2022
horasal pushed a commit that referenced this issue Aug 19, 2022
Thanks @ekmett for the feedback!  Fix #1.
Other changes:

* Deprecate `from_slice` in favor of `from_index_slice`
* add `from_bool_slice` for API consistency
* Fix a panic in `set(513, _)` when `nbits <= 512`
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