This commit is contained in:
Antonio Scandurra 2023-10-24 10:31:35 +02:00
parent 18eb4a7292
commit 953857f8e3
5 changed files with 69 additions and 54 deletions

View file

@ -399,14 +399,14 @@ impl Worktree {
})
}
pub fn remote(
pub fn remote<C: Context>(
project_remote_id: u64,
replica_id: ReplicaId,
worktree: proto::WorktreeMetadata,
client: Arc<Client>,
cx: &mut AppContext,
) -> Handle<Self> {
cx.add_model(|cx: &mut ModelContext<Self>| {
cx.entity(|cx: &mut ModelContext<Self>| {
let snapshot = Snapshot {
id: WorktreeId(worktree.id as usize),
abs_path: Arc::from(PathBuf::from(worktree.abs_path)),