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
+1 -1
View File
@@ -447,7 +447,7 @@ impl Buffer {
if let Some(file) = &self.file {
let snapshot = self.snapshot();
let version = self.version.clone();
let save_task = file.save(snapshot, ctx.app());
let save_task = file.save(snapshot, ctx.as_ref());
let task = ctx.spawn(save_task, |me, save_result, ctx| {
if save_result.is_ok() {
me.did_save(version, ctx);