sum_tree: Replace rayon with futures (#41586)

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored by: Kate <kate@zed.dev>
This commit is contained in:
Lukas Wirth
2025-10-31 10:39:01 +00:00
committed by GitHub
parent 7c29c6d7a6
commit f2ce06c7b0
67 changed files with 1271 additions and 640 deletions
+6 -4
View File
@@ -189,7 +189,7 @@ impl super::LspAdapter for CLspAdapter {
Some(lsp::CompletionItemKind::FIELD) if completion.detail.is_some() => {
let detail = completion.detail.as_ref().unwrap();
let text = format!("{} {}", detail, label);
let source = Rope::from(format!("struct S {{ {} }}", text).as_str());
let source = Rope::from_str_small(format!("struct S {{ {} }}", text).as_str());
let runs = language.highlight_text(&source, 11..11 + text.len());
let filter_range = completion
.filter_text
@@ -206,7 +206,8 @@ impl super::LspAdapter for CLspAdapter {
{
let detail = completion.detail.as_ref().unwrap();
let text = format!("{} {}", detail, label);
let runs = language.highlight_text(&Rope::from(text.as_str()), 0..text.len());
let runs =
language.highlight_text(&Rope::from_str_small(text.as_str()), 0..text.len());
let filter_range = completion
.filter_text
.as_deref()
@@ -222,7 +223,8 @@ impl super::LspAdapter for CLspAdapter {
{
let detail = completion.detail.as_ref().unwrap();
let text = format!("{} {}", detail, label);
let runs = language.highlight_text(&Rope::from(text.as_str()), 0..text.len());
let runs =
language.highlight_text(&Rope::from_str_small(text.as_str()), 0..text.len());
let filter_range = completion
.filter_text
.as_deref()
@@ -326,7 +328,7 @@ impl super::LspAdapter for CLspAdapter {
Some(CodeLabel::new(
text[display_range.clone()].to_string(),
filter_range,
language.highlight_text(&text.as_str().into(), display_range),
language.highlight_text(&Rope::from_str_small(text.as_str()), display_range),
))
}