Fix and extent ControlFlow traverse_inorder example#90196
Merged
bors merged 2 commits intorust-lang:masterfrom Oct 26, 2021
Merged
Fix and extent ControlFlow traverse_inorder example#90196bors merged 2 commits intorust-lang:masterfrom
traverse_inorder example#90196bors merged 2 commits intorust-lang:masterfrom
Conversation
Fix and extent ControlFlow `traverse_inorder` example 1. The existing example compiles on its own, but any usage fails to be monomorphised and so doesn't compile. Fix that by using Fn trait instead of FnMut. 2. Added an example usage of `traverse_inorder` showing how we can terminate the traversal early. Fixes rust-lang#90063
Contributor
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. Please see the contribution instructions for more information. |
scottmcm
reviewed
Oct 23, 2021
scottmcm
reviewed
Oct 23, 2021
scottmcm
reviewed
Oct 23, 2021
1. The existing example compiles on its own, but any usage fails to be monomorphised and so doesn't compile. Fix that by using a mutable reference as an input argument. 2. Added an example usage of `traverse_inorder` showing how we can terminate the traversal early. Fixes rust-lang#90063
Contributor
Author
|
@rustbot label: +S-waiting-on-review -S-waiting-on-author |
Member
|
Thanks for the updates! This looks great. @bors r+ |
Collaborator
|
📌 Commit f3795e2 has been approved by |
scottmcm
approved these changes
Oct 25, 2021
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 25, 2021
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#89581 (Add -Z no-unique-section-names to reduce ELF header bloat.) - rust-lang#90196 (Fix and extent ControlFlow `traverse_inorder` example) - rust-lang#90255 (:arrow_up: rust-analyzer) - rust-lang#90266 (Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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.
Fix and extent ControlFlow
traverse_inorderexampletraverse_inordershowing how we can terminate the traversal early.Fixes #90063