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

useless_asref: do not lint .as_ref().map(Arc::clone) #12535

Merged
merged 2 commits into from
Mar 23, 2024

Conversation

samueltardieu
Copy link
Contributor

This applies to Arc, Rc, and their weak variants. Using .clone() would be less idiomatic.

This follows the discussion in #12528 (comment).

changelog: [useless_asref]: do not lint .as_ref().map(Arc::clone) and similar

@rustbot
Copy link
Collaborator

rustbot commented Mar 22, 2024

r? @Manishearth

rustbot has assigned @Manishearth.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 22, 2024
@samueltardieu
Copy link
Contributor Author

r? @y21

@rustbot rustbot assigned y21 and unassigned Manishearth Mar 22, 2024
Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

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

Makes sense, good idea to move it to utils

r=me with (or without if it doesn't make sense) doc nit fixed

clippy_utils/src/ty.rs Outdated Show resolved Hide resolved
@samueltardieu
Copy link
Contributor Author

@bors r=y21

@bors
Copy link
Contributor

bors commented Mar 23, 2024

@samueltardieu: 🔑 Insufficient privileges: Not in reviewers

@samueltardieu
Copy link
Contributor Author

@bors r=y21

I don't have the needed privileges, maybe you could have used delegate+

@y21
Copy link
Member

y21 commented Mar 23, 2024

oops, my bad 😅

Thanks, looks good!

@bors r+

@bors
Copy link
Contributor

bors commented Mar 23, 2024

📌 Commit fed2f28 has been approved by y21

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Mar 23, 2024

⌛ Testing commit fed2f28 with merge 12f7c17...

@bors
Copy link
Contributor

bors commented Mar 23, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: y21
Pushing 12f7c17 to master...

@bors bors merged commit 12f7c17 into rust-lang:master Mar 23, 2024
5 checks passed
@y21 y21 mentioned this pull request May 21, 2024
@samueltardieu samueltardieu deleted the issue-12528 branch September 2, 2024 07:48
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