From 47b29a5f21369b3dcd2d2be66f98a0244f953286 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 5 Oct 2021 14:36:38 +0200 Subject: [PATCH] Extract `people_panel` into its own crate --- Cargo.lock | 12 ++++++++++++ crates/people_panel/Cargo.toml | 11 +++++++++++ .../src/people_panel.rs => people_panel/src/lib.rs} | 0 crates/zed/Cargo.toml | 1 + crates/zed/src/lib.rs | 2 +- crates/zed/src/main.rs | 9 +++------ 6 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 crates/people_panel/Cargo.toml rename crates/{zed/src/people_panel.rs => people_panel/src/lib.rs} (100%) diff --git a/Cargo.lock b/Cargo.lock index 57446e740a..fa8d33c425 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3440,6 +3440,17 @@ dependencies = [ "regex", ] +[[package]] +name = "people_panel" +version = "0.1.0" +dependencies = [ + "client", + "gpui", + "postage", + "theme", + "workspace", +] + [[package]] name = "percent-encoding" version = "2.1.0" @@ -6154,6 +6165,7 @@ dependencies = [ "log-panics", "num_cpus", "parking_lot", + "people_panel", "postage", "project", "project_panel", diff --git a/crates/people_panel/Cargo.toml b/crates/people_panel/Cargo.toml new file mode 100644 index 0000000000..dd8e2114be --- /dev/null +++ b/crates/people_panel/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "people_panel" +version = "0.1.0" +edition = "2018" + +[dependencies] +client = { path = "../client" } +gpui = { path = "../gpui" } +theme = { path = "../theme" } +workspace = { path = "../workspace" } +postage = { version = "0.4.1", features = ["futures-traits"] } diff --git a/crates/zed/src/people_panel.rs b/crates/people_panel/src/lib.rs similarity index 100% rename from crates/zed/src/people_panel.rs rename to crates/people_panel/src/lib.rs diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 48195fcb4c..d3f41cbb15 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -33,6 +33,7 @@ fuzzy = { path = "../fuzzy" } editor = { path = "../editor" } file_finder = { path = "../file_finder" } gpui = { path = "../gpui" } +people_panel = { path = "../people_panel" } project = { path = "../project" } project_panel = { path = "../project_panel" } rpc = { path = "../rpc" } diff --git a/crates/zed/src/lib.rs b/crates/zed/src/lib.rs index 831bc98b62..93ca505cdc 100644 --- a/crates/zed/src/lib.rs +++ b/crates/zed/src/lib.rs @@ -1,7 +1,6 @@ pub mod assets; pub mod language; pub mod menus; -pub mod people_panel; #[cfg(any(test, feature = "test-support"))] pub mod test; pub mod theme_selector; @@ -19,6 +18,7 @@ use gpui::{ ModelHandle, MutableAppContext, PathPromptOptions, Task, ViewContext, }; use parking_lot::Mutex; +pub use people_panel; use people_panel::PeoplePanel; use postage::watch; pub use project::{self, fs}; diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 13be0128ff..837fe7b645 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -1,6 +1,7 @@ // Allow binary to be called Zed for a nice application menu when running executable direcly #![allow(non_snake_case)] +use client::{self, http, ChannelList, UserStore}; use fs::OpenOptions; use gpui::AssetSource; use log::LevelFilter; @@ -10,12 +11,8 @@ use std::{fs, path::PathBuf, sync::Arc}; use theme::ThemeRegistry; use workspace::{self, settings, OpenNew}; use zed::{ - self, - assets::Assets, - client::{self, http, ChannelList, UserStore}, - editor, - fs::RealFs, - language, menus, people_panel, theme_selector, AppState, OpenParams, OpenPaths, + self, assets::Assets, fs::RealFs, language, menus, theme_selector, AppState, OpenParams, + OpenPaths, }; fn main() {