-
Notifications
You must be signed in to change notification settings - Fork 98
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
Update safety comments to cite specific versions #1835
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1835 +/- ##
=======================================
Coverage 87.40% 87.40%
=======================================
Files 16 16
Lines 5995 5995
=======================================
Hits 5240 5240
Misses 755 755 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! There's one link you missed. Could you also run ./cargo.sh +stable fmt
?
src/impls.rs
Outdated
/// [1] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroU8.html | ||
/// `NonZeroU8 is guaranteed to have the same layout and bit validity as u8 with | ||
/// the exception that 0 is not a valid instance` | ||
/// [2] https://doc.rust-lang.org/stable/std/num/type.NonZeroI8.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// [2] https://doc.rust-lang.org/stable/std/num/type.NonZeroI8.html | |
/// [2] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroI8.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! One small nit.
src/impls.rs
Outdated
/// [1] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroU8.html | ||
/// `NonZeroU8 is guaranteed to have the same layout and bit validity as u8 with | ||
/// the exception that 0 is not a valid instance` | ||
/// [2] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroI8.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// [1] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroU8.html | |
/// `NonZeroU8 is guaranteed to have the same layout and bit validity as u8 with | |
/// the exception that 0 is not a valid instance` | |
/// [2] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroI8.html | |
/// [1] Per https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroU8.html: | |
/// | |
/// `NonZeroU8` is guaranteed to have the same layout and bit validity as `u8` with | |
/// the exception that 0 is not a valid instance | |
/// | |
/// [2] https://doc.rust-lang.org/1.81.0/std/num/type.NonZeroI8.html |
The backticks are used around code items like NonZeroU8
or u8
, not around the entire quote. Also, add a newline before (and in the case where there's another citation afterward, a newline after as well).
Update Reference and docs links in safety comments to reference specific versions of the Rust toolchain. Makes progress on google#1655
Related issue #1655