Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Follow-up of #12104.

It was missing this check to suggest the correct method.

r? @llogiq

changelog: Fix suggestion for map_clone lint on types implementing Copy

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 11, 2024
@GuillaumeGomez
Copy link
Member Author

I just realized that copied is only implemented for references on Option and Result, so this current code is actually invalid.

@GuillaumeGomez
Copy link
Member Author

And fixed. It was not only the copied method but also the cloned one.

@llogiq
Copy link
Contributor

llogiq commented Jan 11, 2024

Thanks, that's exactly what I was hinting at.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 11, 2024

📌 Commit 74db4b7 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 11, 2024

⌛ Testing commit 74db4b7 with merge 88b5d51...

@bors
Copy link
Contributor

bors commented Jan 11, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 88b5d51 to master...

@bors bors merged commit 88b5d51 into rust-lang:master Jan 11, 2024
@GuillaumeGomez GuillaumeGomez deleted the map-clone-copy branch January 12, 2024 10:21
@GuillaumeGomez
Copy link
Member Author

Thanks, that's exactly what I was hinting at.

Absolutely, thanks again for the tip. ;)

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.

4 participants