mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rename Task to TaskBox
This commit is contained in:
parent
f088b708c9
commit
52527d6f9d
19 changed files with 71 additions and 69 deletions
|
@ -40,7 +40,7 @@ use std::collections::HashMap;
|
|||
use std::rc::Rc;
|
||||
use std::str::FromStr;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use task::Task;
|
||||
use task::TaskBox;
|
||||
|
||||
const KEY_CONVERSION_ERROR: &'static str = "This `manufacturerData` key can not be parsed as unsigned short:";
|
||||
const FILTER_EMPTY_ERROR: &'static str = "'filters' member, if present, must be nonempty to find any devices.";
|
||||
|
@ -229,11 +229,11 @@ pub fn response_async<T: AsyncBluetoothListener + DomObject + 'static>(
|
|||
action: BluetoothResponseResult,
|
||||
}
|
||||
|
||||
impl<T> Task for ListenerTask<T>
|
||||
impl<T> TaskBox for ListenerTask<T>
|
||||
where
|
||||
T: AsyncBluetoothListener + DomObject,
|
||||
{
|
||||
fn run(self: Box<Self>) {
|
||||
fn run_box(self: Box<Self>) {
|
||||
let this = *self;
|
||||
let mut context = this.context.lock().unwrap();
|
||||
context.response(this.action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue