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

[read_line_without_trim]: detect string literal comparison and .ends_with() calls #11136

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

y21
Copy link
Member

@y21 y21 commented Jul 10, 2023

This lint now also realizes that a comparison like s == "foo" and calls such as s.ends_with("foo") will fail if s was initialized by a call to Stdin::read_line (because of the trailing newline).

changelog: [read_line_without_trim]: detect string literal comparison and .ends_with() calls

r? @giraffate assigning you because you reviewed #10970 that added this lint, so this is kinda a followup PR ^^

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 10, 2023
@bors
Copy link
Collaborator

bors commented Jul 13, 2023

☔ The latest upstream changes (presumably #11095) made this pull request unmergeable. Please resolve the merge conflicts.

@dswij
Copy link
Member

dswij commented Feb 14, 2024

r? @dswij

@rustbot rustbot assigned dswij and unassigned giraffate Feb 14, 2024
@y21 y21 force-pushed the enhance_read_line_without_trim branch from ea4fc58 to f94b066 Compare February 14, 2024 16:26
@y21
Copy link
Member Author

y21 commented Feb 14, 2024

wow, this PR is ancient :D

(The first commit is the actual relevant addition, the second one moves some things around which causes the diff to look a bit annoying, so it's probably better reviewed commit-by-commit)

@bors
Copy link
Collaborator

bors commented Feb 19, 2024

☔ The latest upstream changes (presumably #12306) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

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

Thanks for this! Sorry that the review take awhile.

Can you help to rebase this? I think it's good to merge afterward.

@y21 y21 force-pushed the enhance_read_line_without_trim branch from f94b066 to fd85db3 Compare February 26, 2024 19:25
@dswij
Copy link
Member

dswij commented Feb 27, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 27, 2024

📌 Commit fd85db3 has been approved by dswij

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 27, 2024

⌛ Testing commit fd85db3 with merge fb06081...

@bors
Copy link
Collaborator

bors commented Feb 27, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing fb06081 to master...

@bors bors merged commit fb06081 into rust-lang:master Feb 27, 2024
5 checks passed
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.

5 participants