-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
single_char_insert_str: lint using insert_str() on single-char literals and suggest insert() #6037
Conversation
r? @ebroto (rust_highfive has picked a reviewer for you, use r? to override) |
d02e4c8
to
eefeb4c
Compare
76b4952
to
e82a280
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in reviewing, I did not have access to my computer during this week.
In the related issue you were thinking about extending single_char_push_str
, but ended up adding a new lint. Out of curiosity, what made you change your mind? (I'm fine with both options).
I made it a separate lint because this way users could disable push_str and insert_str independently but it's probably better to just make it one lint since the patterns are so similar. |
9f5d8bb
to
956a847
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some remarks after the unification of the lints
956a847
to
4b90e0d
Compare
I've addressed the remaining remarks in the PR. r? @flip1995 for my changes |
☔ The latest upstream changes (presumably #6197) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
…and suggest insert() changelog: single_char_push_str: lint using string.insert_str() with single char literals and suggests string.insert() with a char Fixes rust-lang#6026
… detected properly
4b90e0d
to
d958269
Compare
@bors r+ Thanks! |
📌 Commit f8ac1f9 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fixes #6026
changelog: add single_char_insert_str lint which lints using string.insert_str() with single char literals and suggests string.insert() with a char