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

Simplify the wrapping code for initializer-expression wrapping #59397

Merged
merged 15 commits into from
Feb 14, 2022

Conversation

CyrusNajmabadi
Copy link
Member

Followup to #39878

@CyrusNajmabadi
Copy link
Member Author

@sharwell this is ready to rereview.

@CyrusNajmabadi
Copy link
Member Author

@davidwengier

{
internal abstract partial class AbstractSeparatedListWrapper<TListSyntax, TListItemSyntax>
{
protected abstract class AbstractSeparatedListCodeComputer<TWrapper> : AbstractCodeActionComputer<TWrapper>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code just moved back into AbstractSeparatedListWrapper

protected sealed override ImmutableArray<Edit> GetWrapEachEdits(
WrappingStyle wrappingStyle, SyntaxTrivia indentationTrivia)
{
using var _ = ArrayBuilder<Edit>.GetInstance(out var result);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all this logic was basically teh same as normal separated wrapping, just with some tweaks about how hte start/end brace are handled. so this merged back into that, and that code was updated to be hte same as before, just with specialization around start/end brace.

Copy link
Contributor

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming the absence of tests here means no behaviour change

@CyrusNajmabadi CyrusNajmabadi merged commit c9d41c5 into dotnet:main Feb 14, 2022
@ghost ghost added this to the Next milestone Feb 14, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the simplifyWrapping branch February 14, 2022 04:59
@CyrusNajmabadi
Copy link
Member Author

Assuming the absence of tests here means no behaviour change

Yup. It was just a simplification refactoring

@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants