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:
@@ -361,10 +361,12 @@ async fn build_buffer_diff(
|
||||
) -> Result<Entity<BufferDiff>> {
|
||||
let buffer = cx.update(|cx| buffer.read(cx).snapshot())?;
|
||||
|
||||
let executor = cx.background_executor().clone();
|
||||
let old_text_rope = cx
|
||||
.background_spawn({
|
||||
let old_text = old_text.clone();
|
||||
async move { Rope::from(old_text.as_str()) }
|
||||
let executor = executor.clone();
|
||||
async move { Rope::from_str(old_text.as_str(), &executor) }
|
||||
})
|
||||
.await;
|
||||
let base_buffer = cx
|
||||
|
||||
Reference in New Issue
Block a user