Rename Task to TaskBox

This commit is contained in:
Anthony Ramine 2017-09-20 09:59:52 +02:00
parent f088b708c9
commit 52527d6f9d
19 changed files with 71 additions and 69 deletions

View file

@ -40,7 +40,7 @@ use std::marker::PhantomData;
use std::os;
use std::rc::Rc;
use std::sync::{Arc, Weak};
use task::Task;
use task::TaskBox;
#[allow(missing_docs)] // FIXME
@ -122,7 +122,7 @@ impl TrustedPromise {
/// A task which will reject the promise.
#[allow(unrooted_must_root)]
pub fn reject_task(self, error: Error) -> impl Task {
pub fn reject_task(self, error: Error) -> impl TaskBox {
let this = self;
task!(reject_promise: move || {
debug!("Rejecting promise.");
@ -135,7 +135,7 @@ impl TrustedPromise {
/// A task which will resolve the promise.
#[allow(unrooted_must_root)]
pub fn resolve_task<T>(self, value: T) -> impl Task
pub fn resolve_task<T>(self, value: T) -> impl TaskBox
where
T: ToJSValConvertible + Send,
{