From e6c42d4155648e438eba0af40caa41d9ca96be6f Mon Sep 17 00:00:00 2001 From: alexlapa Date: Thu, 14 Mar 2019 12:50:50 -0600 Subject: [PATCH] fix --- .../tests/wasm/rtc_rtp_transceiver_direction.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/web-sys/tests/wasm/rtc_rtp_transceiver_direction.rs b/crates/web-sys/tests/wasm/rtc_rtp_transceiver_direction.rs index 29bf80dc..15dbe7aa 100644 --- a/crates/web-sys/tests/wasm/rtc_rtp_transceiver_direction.rs +++ b/crates/web-sys/tests/wasm/rtc_rtp_transceiver_direction.rs @@ -21,9 +21,9 @@ extern "C" { } #[wasm_bindgen_test(async)] -fn rtc_rtp_transceiver_direction() -> impl Future { +fn rtc_rtp_transceiver_direction() -> Box> { if !is_unified_avail() { - ok::<(), JsValue>(()); + return Box::new(Ok(()).into_future()); } let mut tr_init: RtcRtpTransceiverInit = RtcRtpTransceiverInit::new(); @@ -39,7 +39,7 @@ fn rtc_rtp_transceiver_direction() -> impl Future { let pc2: RtcPeerConnection = RtcPeerConnection::new().unwrap(); - exchange_sdps(pc1, pc2).and_then(move |(_, p2)| { + let r = exchange_sdps(pc1, pc2).and_then(move |(_, p2)| { assert_eq!(tr1.direction(), RtcRtpTransceiverDirection::Sendonly); assert_eq!( tr1.current_direction(), @@ -61,7 +61,9 @@ fn rtc_rtp_transceiver_direction() -> impl Future { ); Ok(()) - }) + }); + + Box::new(r) } fn exchange_sdps(