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
+10 -3
View File
@@ -712,8 +712,10 @@ pub enum ResolveState {
impl InlayHint {
pub fn text(&self) -> Rope {
match &self.label {
InlayHintLabel::String(s) => Rope::from(s),
InlayHintLabel::LabelParts(parts) => parts.iter().map(|part| &*part.value).collect(),
InlayHintLabel::String(s) => Rope::from_str_small(s),
InlayHintLabel::LabelParts(parts) => {
Rope::from_iter_small(parts.iter().map(|part| &*part.value))
}
}
}
}
@@ -5402,7 +5404,12 @@ impl Project {
worktree
.update(cx, |worktree, cx| {
let line_ending = text::LineEnding::detect(&new_text);
worktree.write_file(rel_path.clone(), new_text.into(), line_ending, cx)
worktree.write_file(
rel_path.clone(),
Rope::from_str(&new_text, cx.background_executor()),
line_ending,
cx,
)
})?
.await
.context("Failed to write settings file")?;