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::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);