Remove workspace::Item trait

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Max Brunsfeld
2022-03-16 13:34:06 -07:00
co-authored by Nathan Sobo Keith Simmons Antonio Scandurra
parent e8efaed1b2
commit a88320dc5f
10 changed files with 281 additions and 517 deletions
+10
View File
@@ -3221,6 +3221,16 @@ impl Project {
self.active_entry
}
pub fn entry_for_path(&self, path: &ProjectPath, cx: &AppContext) -> Option<ProjectEntry> {
self.worktree_for_id(path.worktree_id, cx)?
.read(cx)
.entry_for_path(&path.path)
.map(|entry| ProjectEntry {
worktree_id: path.worktree_id,
entry_id: entry.id,
})
}
// RPC message handlers
async fn handle_unshare_project(