Repository navigation
Add support for the unstable f16 and f128 types - #2042
Merged
Merged
Conversation
Brezak
force-pushed
the
new-floats
branch
2 times, most recently
from
November 9, 2024 14:36
2c86de4 to
9e04925
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v0.8.x #2042 +/- ##
=======================================
Coverage 87.64% 87.64%
=======================================
Files 16 16
Lines 6016 6016
=======================================
Hits 5273 5273
Misses 743 743 ☔ View full report in Codecov by Sentry. |
joshlf
requested changes
Nov 12, 2024
joshlf
left a comment
Member
There was a problem hiding this comment.
This looks great, thanks so much for the contribution! A few small changes requested, but broadly this looks good to go.
Brezak
force-pushed
the
new-floats
branch
2 times, most recently
from
November 12, 2024 21:11
f2c86d6 to
37cecbd
Compare
joshlf
requested changes
Nov 13, 2024
joshlf
left a comment
Member
There was a problem hiding this comment.
Okay awesome! One more very small nitpick and then this should be ready for approval!
Comment on lines
+75
to
+78
| #[cfg(feature="float-nightly")] | ||
| unsafe_impl!(#[cfg_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f16: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); | ||
| #[cfg(feature="float-nightly")] | ||
| unsafe_impl!(#[cfg_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f128: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); |
Member
There was a problem hiding this comment.
For consistency with other uses:
Suggested change
| #[cfg(feature="float-nightly")] | |
| unsafe_impl!(#[cfg_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f16: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); | |
| #[cfg(feature="float-nightly")] | |
| unsafe_impl!(#[cfg_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f128: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); | |
| #[cfg(feature = "float-nightly")] | |
| unsafe_impl!(#[cfg_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f16: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); | |
| #[cfg(feature = "float-nightly")] | |
| unsafe_impl!(#[cfg_attr(doc_cfg, doc(cfg(feature = "float-nightly")))] f128: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes); |
joshlf
enabled auto-merge
November 13, 2024 22:33
joshlf
approved these changes
Nov 13, 2024
joshlf
left a comment
Member
There was a problem hiding this comment.
Awesome, thanks again for all your work on this!
joshlf
added this pull request to the merge queue
Nov 13, 2024
google-pr-creation-bot
pushed a commit
to google-pr-creation-bot/zerocopy
that referenced
this pull request
Nov 13, 2024
Member
|
Backporting in #2058. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also extend
unsafe_implwith support for adding arbitrary attributes to the impls.Closes #1999