Skip to content

Commit f772949

Browse files
Fix
1 parent 265ca0a commit f772949

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Workspaces/Core/Portable/CodeActions/CodeAction_Cleanup.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public abstract partial class CodeAction
4343
private static readonly Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> s_cleanupSyntaxPass =
4444
static (document, options, cancellationToken) => CleanupSyntaxAsync(document, options, cancellationToken);
4545

46+
private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_cleanupSyntaxPasses = [s_cleanupSyntaxPass];
47+
4648
/// <summary>
4749
/// We do cleanup in N serialized passes. This allows us to process all documents in parallel, while only forking
4850
/// the solution N times *total* (instead of N times *per* document).
@@ -109,7 +111,7 @@ internal static async Task<Solution> PostProcessChangesAsync(
109111

110112
return await CleanSyntaxAndSemanticsAsync(
111113
originalSolution, changedSolution, progress,
112-
cleanup is CodeActionCleanup.SyntaxOnly ? [s_cleanupSyntaxPass] : s_allCleanupPasses,
114+
cleanup is CodeActionCleanup.SyntaxOnly ? s_cleanupSyntaxPasses : s_allCleanupPasses,
113115
cancellationToken).ConfigureAwait(false);
114116
}
115117

0 commit comments

Comments
 (0)