Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pv42 committed Sep 1, 2024
1 parent 9758ad6 commit d1f626c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 6 additions & 4 deletions mavlink/tests/tcp_loopback_async_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ mod test_tcp_connections {

let server_thread = tokio::spawn(async move {
//TODO consider using get_available_port to use a random port
let mut server =
mavlink::connect_async("tcpin:0.0.0.0:14551").await.expect("Couldn't create server");
let mut server = mavlink::connect_async("tcpin:0.0.0.0:14551")
.await
.expect("Couldn't create server");

#[cfg(feature = "signing")]
server.setup_signing(Some(singing_cfg_server));
Expand Down Expand Up @@ -53,8 +54,9 @@ mod test_tcp_connections {
tokio::spawn(async move {
let msg =
mavlink::common::MavMessage::HEARTBEAT(crate::test_shared::get_heartbeat_msg());
let mut client =
mavlink::connect_async("tcpout:127.0.0.1:14551").await.expect("Couldn't create client");
let mut client = mavlink::connect_async("tcpout:127.0.0.1:14551")
.await
.expect("Couldn't create client");

#[cfg(feature = "signing")]
client.setup_signing(Some(singing_cfg_client));
Expand Down
9 changes: 6 additions & 3 deletions mavlink/tests/udp_loopback_async_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ mod test_udp_connections {
pub async fn test_udp_loopback() {
const RECEIVE_CHECK_COUNT: i32 = 3;

let server = mavlink::connect_async("udpin:0.0.0.0:14552").await.expect("Couldn't create server");
let server = mavlink::connect_async("udpin:0.0.0.0:14552")
.await
.expect("Couldn't create server");

// have the client send one heartbeat per second
tokio::spawn({
async move {
let msg =
mavlink::common::MavMessage::HEARTBEAT(crate::test_shared::get_heartbeat_msg());
let client =
mavlink::connect_async("udpout:127.0.0.1:14552").await.expect("Couldn't create client");
let client = mavlink::connect_async("udpout:127.0.0.1:14552")
.await
.expect("Couldn't create client");
loop {
client.send_default(&msg).await.ok();
}
Expand Down

0 comments on commit d1f626c

Please sign in to comment.