mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use ROUTER::add_typed_route
instead of ROUTER::add_route
everywhere (#33866)
* Use ROUTER::add_typed_route where possible Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update webxr, media and ipc-channel Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
ff374c1428
commit
e33bae6d0a
40 changed files with 177 additions and 195 deletions
|
@ -245,8 +245,8 @@ pub fn response_async<T: AsyncBluetoothListener + DomObject + 'static>(
|
|||
promise: Some(TrustedPromise::new(promise.clone())),
|
||||
receiver: Trusted::new(receiver),
|
||||
}));
|
||||
ROUTER.add_route(
|
||||
action_receiver.to_opaque(),
|
||||
ROUTER.add_typed_route(
|
||||
action_receiver,
|
||||
Box::new(move |message| {
|
||||
struct ListenerTask<T: AsyncBluetoothListener + DomObject> {
|
||||
context: Arc<Mutex<BluetoothContext<T>>>,
|
||||
|
@ -265,7 +265,7 @@ pub fn response_async<T: AsyncBluetoothListener + DomObject + 'static>(
|
|||
|
||||
let task = ListenerTask {
|
||||
context: context.clone(),
|
||||
action: message.to().unwrap(),
|
||||
action: message.unwrap(),
|
||||
};
|
||||
|
||||
let result = task_source.queue_unconditionally(task);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue