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

internal: Unify getter and setter assists #15219

Merged
merged 1 commit into from Jul 6, 2023
Merged

Conversation

alibektas
Copy link
Member

@alibektas alibektas commented Jul 6, 2023

This PR combines what previously have been two different files into a single file. I want to talk about the reasons why I did this. The issue that prompted this PR ( and before I forget : this pr fixes #15080 ) mentions an interesting behavior. We combine these two assists into an assist group and the order in which the assists are listed in this group changes depending on the text range of the selected area. The reason for that is that VSCode prioritizes actions that have an impact in a smaller area and until now generate setter assist was only possible to be invoked for a single field whereas you could generate multiple getters for the getter assist. So I used the latter's infra to make former applicable to multiple fields, hence the unification. So this PR solves in essence

  1. Make generate setter applicable to multiple fields
  2. Provide a consistent order of the said assists in listing.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2023
@Veykril
Copy link
Member

Veykril commented Jul 6, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 6, 2023

📌 Commit 1829d55 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 6, 2023

⌛ Testing commit 1829d55 with merge 54c2ee9...

@Veykril Veykril changed the title Unify getter and setter assists internal: Unify getter and setter assists Jul 6, 2023
@bors
Copy link
Collaborator

bors commented Jul 6, 2023

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

@bors bors merged commit 54c2ee9 into rust-lang:master Jul 6, 2023
10 checks passed
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/setter" UX is bad
4 participants