Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mutexd committed Nov 10, 2024
1 parent ab9813b commit 7b98732
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions interceptor/src/mock/mock_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct MockStream {
rtcp_writer: Mutex<Option<Arc<dyn RTCPWriter + Send + Sync>>>,
rtp_writer: Mutex<Option<Arc<dyn RTPWriter + Send + Sync>>>,

internal: Arc<MockStreamInternal>
internal: Arc<MockStreamInternal>,
}

struct MockStreamInternal {
Expand Down Expand Up @@ -65,7 +65,7 @@ impl MockStream {

rtcp_in_modified_rx: Mutex::new(rtcp_in_modified_rx),
rtp_in_modified_rx: Mutex::new(rtp_in_modified_rx),
})
}),
});

let rtcp_writer = interceptor
Expand Down
12 changes: 10 additions & 2 deletions webrtc/src/data_channel/data_channel_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ async fn test_data_channel_send_before_signaling() -> Result<()> {
d.on_message(Box::new(move |_: DataChannelMessage| {
let d3 = d2.clone();
Box::pin(async move {
let result = d3.upgrade().unwrap().send(&Bytes::from(b"Pong".to_vec())).await;
let result = d3
.upgrade()
.unwrap()
.send(&Bytes::from(b"Pong".to_vec()))
.await;
assert!(result.is_ok(), "Failed to send string on data channel");
})
}));
Expand Down Expand Up @@ -263,7 +267,11 @@ async fn test_data_channel_send_after_connected() -> Result<()> {
let d3 = d2.clone();

Box::pin(async move {
let result = d3.upgrade().unwrap().send(&Bytes::from(b"Pong".to_vec())).await;
let result = d3
.upgrade()
.unwrap()
.send(&Bytes::from(b"Pong".to_vec()))
.await;
assert!(result.is_ok(), "Failed to send string on data channel");
})
}));
Expand Down
17 changes: 8 additions & 9 deletions webrtc/src/peer_connection/peer_connection_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,17 @@ impl PeerConnectionInternal {
.await;

if let Some(dtls_transport) = dtls_transport.upgrade() {
RTCPeerConnection::update_connection_state(
&on_peer_connection_state_change_handler,
&is_closed,
&peer_connection_state,
cs,
dtls_transport.state(),
)
.await;
RTCPeerConnection::update_connection_state(
&on_peer_connection_state_change_handler,
&is_closed,
&peer_connection_state,
cs,
dtls_transport.state(),
)
.await;
} else {
log::warn!("on_ice_connection_state_change: dtls_transport unavailable");
}

})
},
));
Expand Down

0 comments on commit 7b98732

Please sign in to comment.