Rename Task -> EntityTask (a BackgroundTask is just a Task)

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-04-05 17:03:42 -07:00
co-authored by Nathan Sobo
parent 46f8665e41
commit fda1394057
7 changed files with 28 additions and 30 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ use crate::{
worktree::FileHandle,
};
use anyhow::{anyhow, Result};
use gpui::{executor::BackgroundTask, AppContext, Entity, ModelContext};
use gpui::{AppContext, Entity, ModelContext, Task};
use lazy_static::lazy_static;
use rand::prelude::*;
use std::{
@@ -241,7 +241,7 @@ impl Buffer {
}
}
pub fn save(&self, ctx: &mut ModelContext<Self>) -> Option<BackgroundTask<Result<()>>> {
pub fn save(&self, ctx: &mut ModelContext<Self>) -> Option<Task<Result<()>>> {
if let Some(file) = &self.file {
let snapshot = self.snapshot();
Some(file.save(snapshot, ctx.app()))