提交 c96ee86a 编写于 作者: C Cyrus Najmabadi

Simplify

上级 ab000877
......@@ -98,12 +98,10 @@ protected override async Task ProduceTagsAsync(TaggerContext<KeywordHighlightTag
}
using (Logger.LogBlock(FunctionId.Tagger_Highlighter_TagProducer_ProduceTags, cancellationToken))
using (s_listPool.GetPooledObject(out var highlights))
{
var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
using var _ = s_listPool.GetPooledObject();
var highlights = _.Object;
_highlightingService.AddHighlights(root, position, highlights, cancellationToken);
foreach (var span in highlights)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册