mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
💄 Reorder private Project method
This commit is contained in:
parent
213be3d6bd
commit
ec6f2a3ad4
1 changed files with 14 additions and 14 deletions
|
@ -1111,20 +1111,6 @@ impl Project {
|
||||||
Ok(())
|
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<()> {
|
pub fn unshare(&mut self, cx: &mut ModelContext<Self>) -> Result<()> {
|
||||||
if self.is_remote() {
|
if self.is_remote() {
|
||||||
return Err(anyhow!("attempted to unshare a remote project"));
|
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(
|
fn set_worktrees_from_proto(
|
||||||
&mut self,
|
&mut self,
|
||||||
worktrees: Vec<proto::WorktreeMetadata>,
|
worktrees: Vec<proto::WorktreeMetadata>,
|
||||||
|
|
Loading…
Reference in a new issue