Skip to content

from_*e_bytes and to_n*_bytes equivalents for floats #57492

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
clarfonthey opened this issue Jan 10, 2019 · 3 comments · Fixed by #62366
Closed

from_*e_bytes and to_n*_bytes equivalents for floats #57492

clarfonthey opened this issue Jan 10, 2019 · 3 comments · Fixed by #62366
Assignees
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@clarfonthey
Copy link
Contributor

clarfonthey commented Jan 10, 2019

These feel appropriate to add for completeness, and would simply chain from_bits or to_bits with the appropriate integer method.

I'll add a PR soon.

This issue has been assigned to @lzutao via this comment.

@estebank estebank added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jan 10, 2019
@nagisa
Copy link
Member

nagisa commented Jan 10, 2019

Byte order conversions on floats themselves make little sense. The conversions should be done before float’s from/to_bits functions are called.

@nagisa
Copy link
Member

nagisa commented Jan 10, 2019

Err, I misread the proposal the first time around...

tbu- added a commit to tbu-/rust that referenced this issue Mar 18, 2019
Use the same API as for integers.

Fixes rust-lang#57492.
@jonas-schievink jonas-schievink added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jun 10, 2019
@tesuji
Copy link
Contributor

tesuji commented Jul 4, 2019

@rustbot claim

@rustbot rustbot self-assigned this Jul 4, 2019
tesuji pushed a commit to tesuji/rustc that referenced this issue Jul 8, 2019
Use the same API as for integers.

Fixes rust-lang#57492.
bors added a commit that referenced this issue Jul 8, 2019
Add float conversions to and from bytes

Rework of #58756. Address #58756 (comment).

Fixes #57492.

r? @SimonSapin
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
6 participants