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

similar_names: allow "iter" and "item" #7546

Merged
merged 4 commits into from
Aug 12, 2021
Merged

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Aug 7, 2021

changelog: [similar_names] no longer complains about iter and item being too similar

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @giraffate (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 7, 2021
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

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

Can you explain why this is reasonable? There seems not to be related discussion and issues. I'm just wondering.

Also, can you add tests?

@giraffate giraffate 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 Aug 10, 2021
@mgeier
Copy link
Contributor Author

mgeier commented Aug 10, 2021

Can you explain why this is reasonable? There seems not to be related discussion and issues. I'm just wondering.

Yeah, I didn't create an issue. I wasn't sure how this normally works, so I just went for a PR directly.

I think iter is a very reasonable variable name, and it is used a lot in the standard library.

And I guess item is also a reasonable variable name, because it is just a very common word used in a programming context.

They are indeed similar, but I don't think Clippy should warn when using both of them.

Also, can you add tests?

Sure. Where? How?

@giraffate
Copy link
Contributor

@mgeier
Copy link
Contributor Author

mgeier commented Aug 11, 2021

Thanks, I've added tests in 573b897.

@giraffate
Copy link
Contributor

@bors r+

It looks good, thanks!

@bors
Copy link
Contributor

bors commented Aug 12, 2021

📌 Commit f7784ef has been approved by giraffate

@bors
Copy link
Contributor

bors commented Aug 12, 2021

⌛ Testing commit f7784ef with merge 62f4187...

@bors
Copy link
Contributor

bors commented Aug 12, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 62f4187 to master...

@bors bors merged commit 62f4187 into rust-lang:master Aug 12, 2021
@mgeier mgeier deleted the patch-1 branch August 12, 2021 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants