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 Slice Conversion #16

Closed
johannesvollmer opened this issue Sep 25, 2018 · 1 comment
Closed

Mutable Slice Conversion #16

johannesvollmer opened this issue Sep 25, 2018 · 1 comment

Comments

@johannesvollmer
Copy link
Contributor

johannesvollmer commented Sep 25, 2018

In my last pull request I blindly stated that conversion of mutable slices could not be implemented because I thought it would violate mutability rules.

As it turns out, the borrow checker is really smart, and it is indeed possible to reinterpret mutable slices without incorrect behaviour. I need this functionality for efficient binary deserialization of f16 numbers.

I have implemented from_bits_mut and to_bits_mut in f16::slice in my fork. I'd like to send a pull request, if you approve.

@starkat99
Copy link
Owner

Sounds good to me, send the PR

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

2 participants