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:
co-authored by
Nathan Sobo
Keith Simmons
Antonio Scandurra
parent
e8efaed1b2
commit
a88320dc5f
@@ -1,3 +1,5 @@
|
||||
use crate::ProjectEntry;
|
||||
|
||||
use super::{
|
||||
fs::{self, Fs},
|
||||
ignore::IgnoreStack,
|
||||
@@ -1502,6 +1504,13 @@ impl File {
|
||||
pub fn worktree_id(&self, cx: &AppContext) -> WorktreeId {
|
||||
self.worktree.read(cx).id()
|
||||
}
|
||||
|
||||
pub fn project_entry(&self, cx: &AppContext) -> Option<ProjectEntry> {
|
||||
self.entry_id.map(|entry_id| ProjectEntry {
|
||||
worktree_id: self.worktree_id(cx),
|
||||
entry_id,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
|
||||
Reference in New Issue
Block a user