mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01: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
|
@ -157,10 +157,10 @@ fn setup_dom_listener(
|
|||
) -> UnboundedReceiver<DomMsg> {
|
||||
let (sender, receiver) = unbounded_channel();
|
||||
|
||||
ROUTER.add_route(
|
||||
dom_action_receiver.to_opaque(),
|
||||
ROUTER.add_typed_route(
|
||||
dom_action_receiver,
|
||||
Box::new(move |message| {
|
||||
let dom_action = message.to().expect("Ws dom_action message to deserialize");
|
||||
let dom_action = message.expect("Ws dom_action message to deserialize");
|
||||
trace!("handling WS DOM action: {:?}", dom_action);
|
||||
match dom_action {
|
||||
WebSocketDomAction::SendMessage(MessageData::Text(data)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue