-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix doc example for wrapping_abs
#104420
Fix doc example for wrapping_abs
#104420
Conversation
The `max` variable is unused. This change introduces the `min_plus` variable, to make the example similar to the one from `saturating_abs`. An alternative would be to remove the unused variable.
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Looking at https://doc.rust-lang.org/nightly/core/primitive.i8.html#method.wrapping_abs and https://doc.rust-lang.org/nightly/core/primitive.i8.html#method.saturating_abs, we could say |
@JohnTitor Like this? |
Yeah, thank you :) |
Fix doc example for `wrapping_abs` The `max` variable is unused. This change introduces the `min_plus` variable, to make the example similar to the one from `saturating_abs`. An alternative would be to remove the unused variable.
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104420 (Fix doc example for `wrapping_abs`) - rust-lang#104499 (rustdoc JSON: Use `Function` everywhere and remove `Method`) - rust-lang#104500 (`rustc_ast`: remove `ref` patterns) - rust-lang#104511 (Mark functions created for `raw-dylib` on x86 with DllImport storage class) - rust-lang#104595 (Add `PolyExistentialPredicate` type alias) - rust-lang#104605 (deduplicate constant evaluation in cranelift backend) - rust-lang#104628 (Revert "Update CI to use Android NDK r25b") - rust-lang#104662 (Streamline deriving on packed structs.) - rust-lang#104667 (Revert formatting changes of a test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The
max
variable is unused. This change introduces themin_plus
variable, to make the example similar to the one fromsaturating_abs
. An alternative would be to remove the unused variable.