-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add float conversions to and from bytes #58756
Conversation
r? @aidanhs (rust_highfive has picked a reviewer for you, use r? to override) |
Will add docs if the general approach is deemed to be okay. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
ping from triage @tbu- waiting for your updates on the PR in reply to the review above |
Use the same API as for integers. Fixes rust-lang#57492.
ac81d82
to
f39230e
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I'm not really sure what to put into the examples. Does that work? |
I was wondering whether the examples are fine or what I should extend them with. |
The code here seems fine, but since it's a new API I think it should have someone from @rust-lang/libs take a look at the APIs and comment if they're interested before going in. (Not a full FCP, since they're just unstable, but I'm not up-to-date on what they're looking for in new stuff.) Also, @tbu-, you have travis failures: |
I personally feel that the need for these APIs is less pressing than the integer ones, because this operation can already be achieved without unsafe code. (Without But I’m not entirely opposed either. I could see the argument that this more discoverable, it might not be obvious that e.g. Let’s see what other @rust-lang/libs members think. |
I'd personally be in favor of being consistent across all the primitive types, so I'd be ok merging and eventually stabilizing this. I don't feel too strongly though and agree @SimonSapin that the pressure isn't so high as there's already methods of doing this, but I'd just fall a little bit on the other side of the fence! |
@SimonSapin this was pinged back to the libs team recently, do you feel that this shouldn't land as unstable to start off with? It looks like there aren't a ton of other opinions about htese APIs. |
Alright, let’s land this. @tbu-, could you make a few changes?
|
I would suggest keeping |
Ping from triage @tbu-, this still needs a few changes before it can be merged. |
AFAIK, NaN payloads are generally processor-specific, and they can be observed and manipulated using these functions. Perhaps this should not be a |
ping from triage @tbu- any updates? |
@tbu- I'm going to close this for now to keep the backlog clean. Please do re-open it if you get the chance to address the comments in #58756 (comment). |
I reworked this in #62366 . |
Add float conversions to and from bytes Rework of #58756. Address #58756 (comment). Fixes #57492. r? @SimonSapin
Use the same API as for integers.
Fixes #57492.