-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Improve code clarity #64935
Improve code clarity #64935
Conversation
1. Rewrite `if let` into `match` to return earl and avoid indenting giant block 2. Assign `spans_updated` only once
`taken` is actually used afterwards
Make function return early if source map is not present
Also avoid excessive cloning
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (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. |
This comment has been minimized.
This comment has been minimized.
TIL that |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reborrowing doesn't work for loops
@bors r+ rollup |
📌 Commit 50c2a58 has been approved by |
@bors r- I'll approve once CI is green. |
Should compiling UPD: Yes, it takes that long |
CI is green now. @bors r=estebank |
📌 Commit 50c2a58 has been approved by |
Rollup of 10 pull requests Successful merges: - #63674 (syntax: Support modern attribute syntax in the `meta` matcher) - #63931 (Stabilize macros in some more positions) - #64887 (syntax: recover trailing `|` in or-patterns) - #64895 (async/await: improve not-send errors) - #64896 (Remove legacy grammar) - #64907 (A small amount of tidying-up factored out from PR #64648) - #64928 (Add tests for some issues) - #64930 (Silence unreachable code lint from await desugaring) - #64935 (Improve code clarity) - #64937 (Deduplicate closure type errors) Failed merges: r? @ghost
No commit except 55b5428 address performance, just making the existing code more clear.
r? @estebank