Skip to content
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

Fix for #7889 and add new lint needless_splitn #7896

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

surechen
Copy link
Contributor

@surechen surechen commented Oct 29, 2021

fixes: #7889

  1. Fix the problem of manual_split_once changing the original behavior.
  2. Add a new lint needless_splitn.

changelog: Fix the problem of manual_split_once changing the original behavior and add a new lint needless_splitn.

@rust-highfive
Copy link

r? @camsteffen

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 29, 2021
@surechen surechen changed the title Fix for #7889 Fix for lint manual_split_once. Change suggestion ".unwrap().1" after split_once or rsplit_once to .map_or("key=value", |x| x.1). Oct 29, 2021
@surechen surechen changed the title Fix for lint manual_split_once. Change suggestion ".unwrap().1" after split_once or rsplit_once to .map_or("key=value", |x| x.1). Fix for lint manual_split_once. Change suggestion ".unwrap().1" after split_once or rsplit_once to .map_or(.., |x| x.1). Oct 29, 2021
@camsteffen camsteffen added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Nov 1, 2021
@surechen surechen requested a review from camsteffen November 6, 2021 06:54
@rustbot

This comment has been minimized.

@surechen
Copy link
Contributor Author

surechen commented Nov 9, 2021

@rustbot label: +S-waiting-on-review -S-waiting-on-author

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Nov 9, 2021
@surechen surechen requested a review from camsteffen November 13, 2021 02:14
@surechen surechen changed the title Fix for lint manual_split_once. Change suggestion ".unwrap().1" after split_once or rsplit_once to .map_or(.., |x| x.1). Fix for #7889 and add new lint needless_splitn Nov 13, 2021
@surechen surechen requested a review from camsteffen November 16, 2021 15:21
Copy link
Contributor

@camsteffen camsteffen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please squash some commits.

1. Fix the problem of manual_split_once changing the original behavior.
2. Add a new lint needless_splitn.

changelog: Fix the problem of manual_split_once changing the original behavior and add a new lint needless_splitn.
@surechen surechen force-pushed the fix_manual_split_once branch from def7b3e to c051656 Compare November 17, 2021 00:39
@surechen
Copy link
Contributor Author

LGTM! Please squash some commits.

Done. Thanks.

@camsteffen
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 17, 2021

📌 Commit c051656 has been approved by camsteffen

@bors
Copy link
Contributor

bors commented Nov 17, 2021

⌛ Testing commit c051656 with merge 46687f1...

@bors
Copy link
Contributor

bors commented Nov 17, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: camsteffen
Pushing 46687f1 to master...

@bors bors merged commit 46687f1 into rust-lang:master Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

manual_split_once lint causes a change in behaviour
5 participants