diff --git a/zed-rpc/src/rest.rs b/zed-rpc/src/rest.rs index d91ce29b35..1fdf313d63 100644 --- a/zed-rpc/src/rest.rs +++ b/zed-rpc/src/rest.rs @@ -2,6 +2,6 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize)] pub struct CreateWorktreeResponse { - pub worktree_id: u64, + pub worktree_id: i32, pub rpc_address: String, } diff --git a/zed/src/lib.rs b/zed/src/lib.rs index 36c722ce51..70008bf5b9 100644 --- a/zed/src/lib.rs +++ b/zed/src/lib.rs @@ -34,7 +34,7 @@ pub fn init(cx: &mut MutableAppContext) { fn share_worktree(_: &(), cx: &mut MutableAppContext) { let zed_url = std::env::var("ZED_SERVER_URL").unwrap_or("https://zed.dev".to_string()); cx.spawn::<_, _, surf::Result<()>>(|cx| async move { - let (user_id, access_token) = login(zed_url.clone(), cx).await?; + let (user_id, access_token) = login(zed_url.clone(), &cx).await?; let mut response = surf::post(format!("{}/api/worktrees", &zed_url)) .header( @@ -70,7 +70,7 @@ fn share_worktree(_: &(), cx: &mut MutableAppContext) { .detach(); } -fn login(zed_url: String, cx: AsyncAppContext) -> Task> { +fn login(zed_url: String, cx: &AsyncAppContext) -> Task> { let platform = cx.platform(); cx.background_executor().spawn(async move { if let Some((user_id, access_token)) = platform.read_credentials(&zed_url) {