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
+2 -2
View File
@@ -7580,13 +7580,13 @@ pub fn create_and_open_local_file(
path: &'static Path,
window: &mut Window,
cx: &mut Context<Workspace>,
default_content: impl 'static + Send + FnOnce() -> Rope,
default_content: impl 'static + Send + FnOnce(&mut AsyncApp) -> Rope,
) -> Task<Result<Box<dyn ItemHandle>>> {
cx.spawn_in(window, async move |workspace, cx| {
let fs = workspace.read_with(cx, |workspace, _| workspace.app_state().fs.clone())?;
if !fs.is_file(path).await {
fs.create_file(path, Default::default()).await?;
fs.save(path, &default_content(), Default::default())
fs.save(path, &default_content(cx), Default::default())
.await?;
}