-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Simplify 'product' factorial example #57608
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
thanks! @bors r+ rollup |
📌 Commit d808f93 has been approved by |
Simplify 'product' factorial example This simplifies the [`factorial(n: 32)`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-46) implementation as example for the `Iterator::product()` function. It currently uses unnecessary additional complexity. Although very minimal, I do not want to include it in some other irrelevant PR.
Simplify 'product' factorial example This simplifies the [`factorial(n: 32)`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-46) implementation as example for the `Iterator::product()` function. It currently uses unnecessary additional complexity. Although very minimal, I do not want to include it in some other irrelevant PR.
Rollup of 7 pull requests Successful merges: - #57253 (Make privacy checking, intrinsic checking and liveness checking incremental) - #57352 (forbid manually impl'ing one of an object type's marker traits) - #57537 (Small perf improvement for fmt) - #57579 (Add core::iter::once_with()) - #57587 (Add 'rustc-env:RUST_BACKTRACE=0' to const-pat-ice test) - #57608 (Simplify 'product' factorial example) - #57614 ([rustdoc] Fix crates filtering box not being filled) Failed merges: r? @ghost
Simplify 'product' factorial example This simplifies the [`factorial(n: 32)`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-46) implementation as example for the `Iterator::product()` function. It currently uses unnecessary additional complexity. Although very minimal, I do not want to include it in some other irrelevant PR.
Rollup of 8 pull requests Successful merges: - #56044 (Drop partially bound function parameters in the expected order) - #57352 (forbid manually impl'ing one of an object type's marker traits) - #57456 (RawVec doesn't always abort on allocation errors) - #57467 (Implement `check_attribute` to forbid `#[allow_internal_unsafe]`) - #57579 (Add core::iter::once_with()) - #57587 (Add 'rustc-env:RUST_BACKTRACE=0' to const-pat-ice test) - #57608 (Simplify 'product' factorial example) - #57614 ([rustdoc] Fix crates filtering box not being filled) Failed merges: r? @ghost
@frewsxcv Just noticed the GPG signature for the commit is unverified because I apparently used the wrong key. Too bad. If desired, I can rewrite (edit: & force push) the commit to make it verified. |
I think you can force-push to replace commit. |
There is no need for you to sign commits, but note that if you force push you should also leave a comment because GitHub doesn't notify on force push. |
Updated. Done! Sorry for the inconvenience. Edit: it has already been merged (#57630), and has been re-authored anyways. So that's perfect, thanks for merging! |
@Mark-Simulacrum, Please reapprove this commit! |
Yep, I'm just going to close this -- looks like due to the force push that didn't quite happen automatically but we've merged this at this point. |
This simplifies the
factorial(n: 32)
implementation as example for theIterator::product()
function.It currently uses unnecessary additional complexity.
Although very minimal, I do not want to include it in some other irrelevant PR.