mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Make Task require Send
This commit is contained in:
parent
8000efac75
commit
f088b708c9
10 changed files with 25 additions and 21 deletions
|
@ -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 Send + Task {
|
||||
pub fn reject_task(self, error: Error) -> impl Task {
|
||||
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 Send + Task
|
||||
pub fn resolve_task<T>(self, value: T) -> impl Task
|
||||
where
|
||||
T: ToJSValConvertible + Send,
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue