-
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
Remove the redundant Some(try_opt!(..))
in checked_pow
#103159
Conversation
The final return value doesn't need to be tried at all -- we can just return the checked option directly. The optimizer can probably figure this out anyway, but there's no need to make it work here.
(rust-highfive 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
|
@bors r+ rollup |
…=Mark-Simulacrum Remove the redundant `Some(try_opt!(..))` in `checked_pow` The final return value doesn't need to be tried at all -- we can just return the checked option directly. The optimizer can probably figure this out anyway, but there's no need to make it work here.
Rollup of 6 pull requests Successful merges: - rust-lang#103023 (Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases) - rust-lang#103142 (Make diagnostic for unsatisfied `Termination` bounds more precise) - rust-lang#103154 (Fix typo in `ReverseSearcher` docs) - rust-lang#103159 (Remove the redundant `Some(try_opt!(..))` in `checked_pow`) - rust-lang#103163 (Remove all uses of array_assume_init) - rust-lang#103168 (Stabilize asm_sym) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang#103023 (Adding `fuchsia-ignore` and `needs-unwind` to compiler test cases) - rust-lang#103142 (Make diagnostic for unsatisfied `Termination` bounds more precise) - rust-lang#103154 (Fix typo in `ReverseSearcher` docs) - rust-lang#103159 (Remove the redundant `Some(try_opt!(..))` in `checked_pow`) - rust-lang#103163 (Remove all uses of array_assume_init) - rust-lang#103168 (Stabilize asm_sym) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The final return value doesn't need to be tried at all -- we can just
return the checked option directly. The optimizer can probably figure
this out anyway, but there's no need to make it work here.