From d7dc7572ce3fe58a6ea7c783dc1b802df9bf5af9 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Tue, 29 Jan 2019 12:19:04 -0600 Subject: [PATCH] Avoid duplicate calculation of formattedSourceText Co-Authored-By: sharwell --- src/Tools/dotnet-format/CodeFormatter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tools/dotnet-format/CodeFormatter.cs b/src/Tools/dotnet-format/CodeFormatter.cs index 65139919e45..ae3feacee2a 100644 --- a/src/Tools/dotnet-format/CodeFormatter.cs +++ b/src/Tools/dotnet-format/CodeFormatter.cs @@ -166,7 +166,7 @@ private static async Task FormatFilesInProjectAsync(ILogger logger, Pr return null; } - return await formattedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); + return formattedSourceText; }, cancellationToken); formattedDocuments.Add((documentId, formatTask)); -- GitLab