diff --git a/crates/workspace/Cargo.toml b/crates/workspace/Cargo.toml index b68636b50f..54e7eaf463 100644 --- a/crates/workspace/Cargo.toml +++ b/crates/workspace/Cargo.toml @@ -23,7 +23,6 @@ client = { path = "../client" } collections = { path = "../collections" } context_menu = { path = "../context_menu" } drag_and_drop = { path = "../drag_and_drop" } -db = { path = "../db" } fs = { path = "../fs" } gpui = { path = "../gpui" } language = { path = "../language" } diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 5f6a89a325..ece8cedfb1 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -14,7 +14,6 @@ use anyhow::{anyhow, Context, Result}; use call::ActiveCall; use client::{proto, Client, PeerId, TypedEnvelope, UserStore}; use collections::{hash_map, HashMap, HashSet}; -use db::{SerializedItem, SerializedItemKind}; use dock::{DefaultItemFactory, Dock, ToggleDockButton}; use drag_and_drop::DragAndDrop; use fs::{self, Fs}; @@ -78,9 +77,6 @@ type FollowableItemBuilders = HashMap< ), >; -type ItemDeserializers = - HashMap) -> Box>; - #[derive(Clone, PartialEq)] pub struct RemoveWorktreeFromProject(pub WorktreeId); @@ -234,14 +230,6 @@ pub fn register_followable_item(cx: &mut MutableAppContext) { }); } -pub fn register_deserializable_item(cx: &mut MutableAppContext) { - cx.update_default_global(|deserializers: &mut ItemDeserializers, _| { - deserializers.insert(I::serialized_item_kind(), |serialized_item, cx| { - Box::new(cx.add_view(|cx| I::deserialize(serialized_item, cx))) - }) - }); -} - pub struct AppState { pub languages: Arc, pub themes: Arc, @@ -260,7 +248,6 @@ pub enum ItemEvent { UpdateTab, UpdateBreadcrumbs, Edit, - Serialize(SerializedItem), } pub trait Item: View { @@ -346,9 +333,6 @@ pub trait Item: View { fn breadcrumbs(&self, _theme: &Theme, _cx: &AppContext) -> Option> { None } - fn serialized_item_kind() -> SerializedItemKind; - fn deserialize(serialized_item: SerializedItem, cx: &mut ViewContext) -> Self; - fn serialize(&self) -> SerializedItem; } pub trait ProjectItem: Item { @@ -3627,18 +3611,6 @@ mod tests { fn to_item_events(_: &Self::Event) -> Vec { vec![ItemEvent::UpdateTab, ItemEvent::Edit] } - - fn serialized_item_kind() -> SerializedItemKind { - unimplemented!() - } - - fn deserialize(_serialized_item: SerializedItem, _cx: &mut ViewContext) -> Self { - unimplemented!() - } - - fn serialize(&self) -> SerializedItem { - unimplemented!() - } } impl SidebarItem for TestItem {}