提交 02f41d94 编写于 作者: C Cyrus Najmabadi

Fix code

上级 0116b53e
...@@ -232,14 +232,12 @@ private ImmutableArray<DiagnosticData> GetSpecificDiagnostics(Workspace workspac ...@@ -232,14 +232,12 @@ private ImmutableArray<DiagnosticData> GetSpecificDiagnostics(Workspace workspac
} }
else else
{ {
using var pool = SharedPools.Default<List<Data>>().GetPooledObject();
AppendMatchingData(source, workspace, projectId, documentId, id, buffer); AppendMatchingData(source, workspace, projectId, documentId, id, buffer);
Debug.Assert(buffer.Count == 0 || buffer.Count == 1); Debug.Assert(buffer.Count == 0 || buffer.Count == 1);
if (buffer.Count == 1) if (buffer.Count == 1)
{ {
var diagnostics = pool.Object[0].Diagnostics; var diagnostics = buffer[0].Diagnostics;
return includeSuppressedDiagnostics return includeSuppressedDiagnostics
? diagnostics ? diagnostics
: diagnostics.NullToEmpty().WhereAsArray(d => !d.IsSuppressed); : diagnostics.NullToEmpty().WhereAsArray(d => !d.IsSuppressed);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册