Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

:lipstick: Reorder private Project method

Max Brunsfeldec6f2a3ad477
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs
index 97a1f1c5375..5a2a56f8ae0 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<proto::WorktreeMetadata> {
- 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<Self>) -> 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<proto::WorktreeMetadata> {
+ 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<proto::WorktreeMetadata>,