Skip to content

"Generate Deref impl" should also offer generating a DerefMut impl #12266

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

Closed
jonas-schievink opened this issue May 15, 2022 · 1 comment · Fixed by #12276
Closed

"Generate Deref impl" should also offer generating a DerefMut impl #12266

jonas-schievink opened this issue May 15, 2022 · 1 comment · Fixed by #12276
Labels
A-assists C-feature Category: feature request S-actionable Someone could pick this issue up and work on it right now

Comments

@jonas-schievink
Copy link
Contributor

struct S {
    target$0: u8,
}

Here we're offering a "Generate Deref impl using target" assist. This currently only supports a Deref impl though, not a DerefMut impl that you might also want.

It should either open a popup where it asks the user (like the "generate getter/setter" assist), or an assist should be offered on the Deref impl to generate an identical (except with &mut instead of &) DerefMut impl.

@jonas-schievink jonas-schievink added S-actionable Someone could pick this issue up and work on it right now A-assists C-feature Category: feature request labels May 15, 2022
@jhgg
Copy link
Contributor

jhgg commented May 16, 2022

Yeah... I was going to do this but never got around to it lol...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists C-feature Category: feature request S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants