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

Add cloned_instead_of_copied lint #7098

Merged
merged 2 commits into from
Apr 16, 2021
Merged

Conversation

camsteffen
Copy link
Contributor

Don't go cloning all willy-nilly.

Featuring a new get_iterator_item_ty util!

changelog: Add cloned_instead_of_copied lint

Closes #3870

@rust-highfive
Copy link

r? @Manishearth

(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 Apr 16, 2021
@Manishearth
Copy link
Member

@bors r+

thanks!

@bors
Copy link
Contributor

bors commented Apr 16, 2021

📌 Commit 6c4bb85 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 16, 2021

⌛ Testing commit 6c4bb85 with merge 1d8c680...

bors added a commit that referenced this pull request Apr 16, 2021
Add `cloned_instead_of_copied` lint

Don't go cloning all willy-nilly.

Featuring a new `get_iterator_item_ty` util!

changelog: Add cloned_instead_of_copied lint

Closes #3870
@camsteffen
Copy link
Contributor Author

Added semicolon to doc examples 🤦

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 16, 2021

📌 Commit b049c88 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 16, 2021

⌛ Testing commit b049c88 with merge 28dbcd8...

@Manishearth
Copy link
Member

(feel free to r=manishearth for minor CI fixes)

@bors
Copy link
Contributor

bors commented Apr 16, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 28dbcd8 to master...

@bors bors merged commit 28dbcd8 into rust-lang:master Apr 16, 2021
@camsteffen camsteffen deleted the cloned-copied branch July 8, 2021 21:47
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.

Prefer iterator.copied() over iterator.cloned() where possible
4 participants