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:
@@ -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")?;
|
||||
|
||||
Reference in New Issue
Block a user