diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 97a1f1c537..5a2a56f8ae 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -1111,20 +1111,6 @@ impl Project { Ok(()) } - pub fn worktree_metadata_protos(&self, cx: &AppContext) -> Vec { - self.worktrees(cx) - .map(|worktree| { - let worktree = worktree.read(cx); - proto::WorktreeMetadata { - id: worktree.id().to_proto(), - root_name: worktree.root_name().into(), - visible: worktree.is_visible(), - abs_path: worktree.abs_path().to_string_lossy().into(), - } - }) - .collect() - } - pub fn unshare(&mut self, cx: &mut ModelContext) -> Result<()> { if self.is_remote() { return Err(anyhow!("attempted to unshare a remote project")); @@ -5626,6 +5612,20 @@ impl Project { }) } + pub fn worktree_metadata_protos(&self, cx: &AppContext) -> Vec { + self.worktrees(cx) + .map(|worktree| { + let worktree = worktree.read(cx); + proto::WorktreeMetadata { + id: worktree.id().to_proto(), + root_name: worktree.root_name().into(), + visible: worktree.is_visible(), + abs_path: worktree.abs_path().to_string_lossy().into(), + } + }) + .collect() + } + fn set_worktrees_from_proto( &mut self, worktrees: Vec,