Skip to content

Conversation

@agluszak
Copy link
Contributor

Implements an assist to turn a while loop into a loop loop, as requested in #10214.
I'm not sure sure what the guidelines are regarding naming assists convert_x_to_y vs replace_x_with_y.

This is my first commit to rust-analyzer :D Thank you @matklad for your awesome Explaining rust-analyzer series <3

Closes #10214

@agluszak agluszak force-pushed the 10214-turn-while-into-loop branch from 6b36b5a to 72306e1 Compare September 16, 2021 13:48
@Veykril
Copy link
Member

Veykril commented Sep 16, 2021

Regarding naming, I'm not sure either we probably should revisit the assist names at some point to make some more consistent. So using convert as a name is fine for now.

Also once you are done you'll want to run cargo test -p ide_assists locally to generate the doc test(that's the reason why CI is failing right now).

@agluszak agluszak force-pushed the 10214-turn-while-into-loop branch from 72306e1 to b8299f8 Compare September 16, 2021 14:30
@agluszak agluszak requested a review from Veykril September 16, 2021 18:07
@agluszak agluszak force-pushed the 10214-turn-while-into-loop branch from b8299f8 to 0ef1b4e Compare September 16, 2021 20:13
@agluszak agluszak force-pushed the 10214-turn-while-into-loop branch from 0ef1b4e to 11a56f8 Compare September 16, 2021 20:20
@agluszak
Copy link
Contributor Author

Oops, I should have made another commit instead of a force push, I hope you don't mind

@agluszak agluszak requested a review from Veykril September 16, 2021 20:30
@Veykril
Copy link
Member

Veykril commented Sep 16, 2021

No problem force pushes are fine here since the commit wasnt that big anyways
Thanks!
bors r+

@lnicola
Copy link
Member

lnicola commented Sep 16, 2021

changelog feat (first contribution) add "Convert while to loop assist"

@bors
Copy link
Contributor

bors bot commented Sep 16, 2021

@bors bors bot merged commit 00b1984 into rust-lang:master Sep 16, 2021
@lnicola
Copy link
Member

lnicola commented Sep 20, 2021

loop-to-while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add assist to turn while loop into loop loop

3 participants