From 8922437fcd0ae13ab6e3ba23cdac071ff20e7f2a Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 9 Oct 2023 18:13:52 -0600 Subject: [PATCH] code review --- crates/call/src/room.rs | 2 +- crates/workspace/src/workspace.rs | 14 ++------------ crates/zed/Cargo.toml | 2 +- crates/zed/resources/zed.entitlements | 12 ++++++++---- crates/zed/src/main.rs | 13 ++----------- crates/zed/src/{open_url.rs => open_listener.rs} | 10 ---------- 6 files changed, 14 insertions(+), 39 deletions(-) rename crates/zed/src/{open_url.rs => open_listener.rs} (92%) diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs index b7aeee90e2..32b8232b4f 100644 --- a/crates/call/src/room.rs +++ b/crates/call/src/room.rs @@ -878,7 +878,7 @@ impl Room { Ok(()) } - pub fn next_room_update(&mut self) -> impl Future { + pub fn room_update_completed(&mut self) -> impl Future { let mut done_rx = self.room_update_completed_rx.clone(); async move { while let Some(result) = done_rx.next().await { diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index e690757af7..c021384d91 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -47,7 +47,6 @@ use std::{ any::TypeId, borrow::Cow, cmp, env, - fs::OpenOptions, future::Future, path::{Path, PathBuf}, rc::Rc, @@ -4246,7 +4245,8 @@ async fn join_channel_internal( }) .await?; - room.update(cx, |room, _| room.next_room_update()).await; + room.update(cx, |room, _| room.room_update_completed()) + .await; let task = room.update(cx, |room, cx| { if let Some((project, host)) = room.most_active_project(cx) { @@ -4259,16 +4259,6 @@ async fn join_channel_internal( task.await?; return anyhow::Ok(true); } - use std::io::Write; - writeln!( - OpenOptions::new() - .write(true) - .append(true) - .open("/Users/conrad/dbg") - .unwrap(), - "no jokes" - ) - .unwrap(); anyhow::Ok(false) } diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 3c93462d4b..7eb14559be 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -156,7 +156,7 @@ workspace = { path = "../workspace", features = ["test-support"] } unindent.workspace = true -[package.metadata.bundle] +[package.metadata.bundle-dev] icon = ["resources/app-icon-preview@2x.png", "resources/app-icon-preview.png"] identifier = "dev.zed.Zed-Dev" name = "Zed Dev" diff --git a/crates/zed/resources/zed.entitlements b/crates/zed/resources/zed.entitlements index 9f5414243d..f40a8a253a 100644 --- a/crates/zed/resources/zed.entitlements +++ b/crates/zed/resources/zed.entitlements @@ -2,8 +2,6 @@ - com.apple.developer.associated-domains - applinks:cirw.in com.apple.security.automation.apple-events com.apple.security.cs.allow-jit @@ -12,8 +10,14 @@ com.apple.security.device.camera - com.apple.security.keychain-access-groups - MQ55VZLNZQ.dev.zed.Shared + com.apple.security.personal-information.addressbook + + com.apple.security.personal-information.calendars + + com.apple.security.personal-information.location + + com.apple.security.personal-information.photos-library + diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 004e5769d5..a75caa54f6 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -61,20 +61,11 @@ use zed::{ only_instance::{ensure_only_instance, IsOnlyInstance}, }; -use crate::open_url::{OpenListener, OpenRequest}; +use crate::open_listener::{OpenListener, OpenRequest}; -mod open_url; +mod open_listener; fn main() { - writeln!( - OpenOptions::new() - .write(true) - .append(true) - .open("/Users/conrad/dbg") - .unwrap(), - "HELLO" - ) - .unwrap(); let http = http::client(); init_paths(); init_logger(); diff --git a/crates/zed/src/open_url.rs b/crates/zed/src/open_listener.rs similarity index 92% rename from crates/zed/src/open_url.rs rename to crates/zed/src/open_listener.rs index 8cad217a8c..e3c08ff2c8 100644 --- a/crates/zed/src/open_url.rs +++ b/crates/zed/src/open_listener.rs @@ -43,16 +43,6 @@ impl OpenListener { } pub fn open_urls(&self, urls: Vec) { - writeln!( - OpenOptions::new() - .write(true) - .append(true) - .open("/Users/conrad/dbg") - .unwrap(), - "{:?}", - &urls, - ) - .unwrap(); self.triggered.store(true, Ordering::Release); let request = if let Some(server_name) = urls.first().and_then(|url| url.strip_prefix("zed-cli://"))