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

MutableBuffer::typed_data_mut is not safe #1027

alamb opened this issue Dec 11, 2021 · 0 comments · Fixed by #1029 or #1866

MutableBuffer::typed_data_mut is not safe #1027

alamb opened this issue Dec 11, 2021 · 0 comments · Fixed by #1029 or #1866


Copy link

alamb commented Dec 11, 2021

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
As pointed out by @jhorstmann on #921 at #921 (comment),

Buffer::typed_data is marked unsafe and it is very similarMutableBuffer::typed_data_mut which is not marked as unsafe.

After some more research on #996, it seems like the most appropriate thing to do is to mark MutableBuffer::typed_data_mut so the rust type system can better match the semantics.

Describe the solution you'd like

  1. Add unsafe from Buffer::typed_data
  2. Remove note about bool in docstrings

Additional context*
More details on #996

@alamb alamb added the bug label Dec 11, 2021
@alamb alamb self-assigned this Dec 11, 2021
tustvold added a commit to tustvold/arrow-rs that referenced this issue Jun 13, 2022
alamb pushed a commit that referenced this issue Jun 15, 2022
* Mark typed buffer APIs safe (#996) (#1027)

* Fix parquet

* Format

* Review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant