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

fix: Remove unnecessary .as_ref() in generate getter assist #16487

Merged
merged 4 commits into from Feb 8, 2024

Conversation

ShoyuVanilla
Copy link
Contributor

Resolves #12389

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 4, 2024
@lnicola
Copy link
Member

lnicola commented Feb 5, 2024

Unrelated, but I think we're still not handling DerefMut, right?

@ShoyuVanilla
Copy link
Contributor Author

Unrelated, but I think we're still not handling DerefMut, right?

Yes, but its return type and return values are merely handled as &mut T and &mut self.value. If similar checks is needed, I think that we could check for AsMut and coerce to mutable reference 😄

@Veykril
Copy link
Member

Veykril commented Feb 8, 2024

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Feb 8, 2024

📌 Commit 26715a8 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 8, 2024

⌛ Testing commit 26715a8 with merge e071834...

@bors
Copy link
Collaborator

bors commented Feb 8, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing e071834 to master...

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.

"Generate getter" assist unnecessarily uses .as_ref() when deref coercion would work
5 participants