From 9f157bdb6712734e86285347c389906f8ddd60d8 Mon Sep 17 00:00:00 2001 From: Mikayla Maki Date: Fri, 19 May 2023 11:30:10 -0700 Subject: [PATCH] Remove unescessary methods --- crates/project/src/worktree.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index 61f12f7de971cfa566aaa28c11e3302f6eb6dcf6..f178d7162aa8d33a35aa858e032e762626d79579 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -169,10 +169,6 @@ impl RepositoryEntry { .map(|entry| RepositoryWorkDirectory(entry.path.clone())) } - pub(crate) fn contains(&self, snapshot: &Snapshot, path: &Path) -> bool { - self.work_directory.contains(snapshot, path) - } - pub fn status_for_file(&self, snapshot: &Snapshot, path: &Path) -> Option { self.work_directory .relativize(snapshot, path) @@ -305,14 +301,6 @@ impl AsRef for RepositoryWorkDirectory { pub struct WorkDirectoryEntry(ProjectEntryId); impl WorkDirectoryEntry { - // Note that these paths should be relative to the worktree root. - pub(crate) fn contains(&self, snapshot: &Snapshot, path: &Path) -> bool { - snapshot - .entry_for_id(self.0) - .map(|entry| path.starts_with(&entry.path)) - .unwrap_or(false) - } - pub(crate) fn relativize(&self, worktree: &Snapshot, path: &Path) -> Option { worktree.entry_for_id(self.0).and_then(|entry| { path.strip_prefix(&entry.path)