From 87b6cd38653fc4e62e3d4d8519bae253dbf75135 Mon Sep 17 00:00:00 2001 From: andrewdavidmackenzie Date: Wed, 26 Feb 2025 22:33:28 +0100 Subject: [PATCH] Fix formatting --- hw_test/tests/tcp.rs | 11 +++++------ hw_test/tests/usb.rs | 13 ++++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/hw_test/tests/tcp.rs b/hw_test/tests/tcp.rs index ab17bebd..83bfef73 100644 --- a/hw_test/tests/tcp.rs +++ b/hw_test/tests/tcp.rs @@ -11,13 +11,12 @@ use std::time::Duration; const IP: IpAddr = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)); const PORT: u16 = 1234; - // Get config and get tcp ip and port and iroh async fn connect_tcp(ip: IpAddr, port: u16, test: F) where F: FnOnce(HardwareDescription, HardwareConfig, TcpStream) -> Fut, - Fut: Future, + Fut: Future, { match tcp_host::connect(ip, port).await { Ok((hw_desc, hw_config, tcp_stream)) => { @@ -47,7 +46,7 @@ async fn disconnect_tcp() { .await .expect("Could not send Disconnect"); }) - .await; + .await; } #[ignore] @@ -59,7 +58,7 @@ async fn get_config_tcp() { .await .expect("Could not GetConfig"); }) - .await; + .await; } #[ignore] @@ -71,7 +70,7 @@ async fn reconnect_tcp() { .await .expect("Could not send Disconnect"); }) - .await; + .await; tokio::time::sleep(Duration::from_secs(1)).await; @@ -84,4 +83,4 @@ async fn reconnect_tcp() { // piggui tests // connect using usb from piggui via CLI option // connect using tcp from piggui via CLI option -// connect using usb from piggui via CLI option \ No newline at end of file +// connect using usb from piggui via CLI option diff --git a/hw_test/tests/usb.rs b/hw_test/tests/usb.rs index a46758fe..3fa5c05e 100644 --- a/hw_test/tests/usb.rs +++ b/hw_test/tests/usb.rs @@ -8,7 +8,9 @@ const SERIAL: &str = "e66138528350be2b"; #[tokio::test] #[serial] async fn get_known_serial() { - let serials = usb_host::get_serials().await.expect("No usb porky attached"); + let serials = usb_host::get_serials() + .await + .expect("No usb porky attached"); if !serials.is_empty() { assert!(serials.contains(&SERIAL.to_string())); } @@ -17,8 +19,13 @@ async fn get_known_serial() { #[tokio::test] #[serial] async fn connect_usb() { - let serials = usb_host::get_serials().await.expect("No usb porky attached"); + let serials = usb_host::get_serials() + .await + .expect("No usb porky attached"); if !serials.is_empty() { - let (_hardware_description, _hardware_config, _usb_connection) = usb_host::connect(serials.first().expect("Could not get first serial number")).await.expect("Could not connect by USB"); + let (_hardware_description, _hardware_config, _usb_connection) = + usb_host::connect(serials.first().expect("Could not get first serial number")) + .await + .expect("Could not connect by USB"); } }