Refactor: remove a string matching about methods#99119
Merged
bors merged 2 commits intorust-lang:masterfrom Jul 15, 2022
Merged
Refactor: remove a string matching about methods#99119bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
|
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
24b0b0d to
1599c5a
Compare
cjgillot
reviewed
Jul 13, 2022
| if receiver.ends_with(&method_call) { | ||
| None // do not suggest code that is already there (#53348) | ||
| let mut suggestions = iter::zip(iter::repeat(&expr), &methods) | ||
| .filter_map(|(receiver_expr, method)| { |
Contributor
There was a problem hiding this comment.
It may be simpler to bind receiver_expr as a variable above and use it as the closure environment.
| && receiver_method.ident.name == sym::clone | ||
| && method_call_list.contains(&method_call.as_str()) | ||
| { | ||
| vec![( |
Contributor
There was a problem hiding this comment.
Could you add a comment to explain what is the purpose of this branch?
cjgillot
reviewed
Jul 14, 2022
Contributor
cjgillot
left a comment
There was a problem hiding this comment.
Thanks, that is much clearer.
A couple more nits then r=me.
4a11f33 to
45b88af
Compare
Contributor
|
Thanks ! |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 15, 2022
Rollup of 5 pull requests Successful merges: - rust-lang#88991 (Add Nintendo Switch as tier 3 target) - rust-lang#98869 (Remove some usages of `guess_head_span`) - rust-lang#99119 (Refactor: remove a string matching about methods) - rust-lang#99209 (Correctly handle crate level page on docs.rs as well) - rust-lang#99246 (Update RLS) 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.
This patch remove a string matching about methods and adds some rustfix tests.