Replace app/app_mut on contexts with AsRef/AsMut impls

Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com>
This commit is contained in:
Nathan Sobo
2021-04-13 20:07:25 -06:00
co-authored by Brooks Swinnerton
parent 7469240a2e
commit 0a2d2aa684
10 changed files with 95 additions and 77 deletions
+2 -2
View File
@@ -153,8 +153,8 @@ impl Workspace {
.ok_or(anyhow!("worktree {} does not exist", entry.0,))?;
let replica_id = self.replica_id;
let file = worktree.file(entry.1, ctx.app())?;
let history = file.load_history(ctx.app());
let file = worktree.file(entry.1, ctx.as_ref())?;
let history = file.load_history(ctx.as_ref());
let buffer = async move { Ok(Buffer::from_history(replica_id, file, history.await?)) };
let (mut tx, rx) = watch::channel(None);