Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
WIP
Kirill Bulatova9d7c86307de
diff --git a/crates/workspace2/src/item.rs b/crates/workspace2/src/item.rsindex 258d32218bb..4c09ab06bfe 100644--- a/crates/workspace2/src/item.rs+++ b/crates/workspace2/src/item.rs@@ -401,7 +401,7 @@ impl<T: Item> ItemHandle for View<T> {let pending_update = Arc::new(Mutex::new(None));let pending_update_scheduled = Arc::new(AtomicBool::new(false));- let mut _event_subscription =+ let mut event_subscription =Some(cx.subscribe(self, move |workspace, item, event, cx| {let pane = if let Some(pane) = workspace.panes_by_itemdiff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rsindex 3bac52e9632..08cfbc1ee50 100644--- a/crates/workspace2/src/workspace2.rs+++ b/crates/workspace2/src/workspace2.rs@@ -3370,9 +3370,9 @@ impl Workspace {workspace: WeakView<Workspace>,serialized_workspace: SerializedWorkspace,paths_to_open: Vec<Option<ProjectPath>>,- cx: &mut AppContext,+ cx: &mut WindowContext,) -> Task<Result<Vec<Option<Box<dyn ItemHandle>>>>> {- cx.spawn(|mut cx| async move {+ cx.spawn(|_, mut cx| async move {let (project, old_center_pane) = workspace.update(&mut cx, |workspace, _| {(workspace.project().clone(),@@ -3564,7 +3564,7 @@ async fn open_items(workspace: &WeakView<Workspace>,mut project_paths_to_open: Vec<(PathBuf, Option<ProjectPath>)>,app_state: Arc<AppState>,- mut cx: AsyncAppContext,+ mut cx: MainThread<AsyncAppContext>,) -> Result<Vec<Option<Result<Box<dyn ItemHandle>>>>> {let mut opened_items = Vec::with_capacity(project_paths_to_open.len());diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rsindex 793c6d61394..b5b22db140b 100644--- a/crates/zed2/src/main.rs+++ b/crates/zed2/src/main.rs@@ -313,9 +313,9 @@ async fn installation_id() -> Result<String> {}}-async fn restore_or_create_workspace(_app_state: &Arc<AppState>, mut _cx: AsyncAppContext) {+async fn restore_or_create_workspace(app_state: &Arc<AppState>, mut cx: AsyncAppContext) {if let Some(location) = workspace2::last_opened_workspace_paths().await {- cx.update(|cx| workspace2::open_paths(location.paths().as_ref(), app_state, None, cx))+ cx.update(|cx| workspace2::open_paths(location.paths().as_ref(), app_state, None, cx))?.await.log_err();} else if matches!(KEY_VALUE_STORE.read_kvp(FIRST_OPEN), Ok(None)) {