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:
Simon Wülker 2024-10-18 12:47:52 +02:00 committed by GitHub
parent ff374c1428
commit e33bae6d0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 177 additions and 195 deletions

View file

@ -560,11 +560,11 @@ async fn obtain_response(
let devtools_bytes = devtools_bytes.clone();
let chunk_requester2 = chunk_requester.clone();
ROUTER.add_route(
body_port.to_opaque(),
ROUTER.add_typed_route(
body_port,
Box::new(move |message| {
info!("Received message");
let bytes: Vec<u8> = match message.to().unwrap() {
let bytes: Vec<u8> = match message.unwrap() {
BodyChunkResponse::Chunk(bytes) => bytes,
BodyChunkResponse::Done => {
// Step 3, abort these parallel steps.