Require a context when constructing a worktree

This commit is contained in:
Nathan Sobo
2021-04-13 20:09:45 -06:00
parent 24cdfd2471
commit 41f50cdb61
2 changed files with 16 additions and 18 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ impl Workspace {
}
}
let worktree = ctx.add_model(|ctx| Worktree::new(ctx.model_id(), path, Some(ctx)));
let worktree = ctx.add_model(|ctx| Worktree::new(ctx.model_id(), path, ctx));
ctx.observe(&worktree, Self::on_worktree_updated);
self.worktrees.insert(worktree);
ctx.notify();