From 25683d610adbc9ee7170d71f30ab7ef88a3ea10a Mon Sep 17 00:00:00 2001 From: Peter Hartley Date: Mon, 15 Apr 2024 12:10:46 +0100 Subject: [PATCH] Fix new cargo fmt issues --- src/tcp.rs | 2 +- src/udp.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tcp.rs b/src/tcp.rs index 7f1075c..e57fca2 100644 --- a/src/tcp.rs +++ b/src/tcp.rs @@ -223,7 +223,7 @@ impl TcpClientStack for DeviceRefMut<'_, SpiBus, Ho remote: SocketAddr, ) -> nb::Result<(), Self::Error> { let SocketAddr::V4(remote) = remote else { - return Err(nb::Error::Other(Self::Error::UnsupportedAddress)) + return Err(nb::Error::Other(Self::Error::UnsupportedAddress)); }; // TODO dynamically select a random port socket.open(&mut self.bus, 49849 + u16::from(socket.socket.index))?; // chosen by fair dice roll. diff --git a/src/udp.rs b/src/udp.rs index aa47008..7937f55 100644 --- a/src/udp.rs +++ b/src/udp.rs @@ -534,7 +534,7 @@ where remote: SocketAddr, ) -> Result<(), Self::Error> { let SocketAddr::V4(remote) = remote else { - return Err(Self::Error::UnsupportedAddress) + return Err(Self::Error::UnsupportedAddress); }; socket.open(&mut self.bus)?; socket.set_destination(&mut self.bus, remote)?; @@ -602,7 +602,7 @@ where buffer: &[u8], ) -> nb::Result<(), Self::Error> { let SocketAddr::V4(remote) = remote else { - return Err(nb::Error::Other(Self::Error::UnsupportedAddress)) + return Err(nb::Error::Other(Self::Error::UnsupportedAddress)); }; socket.socket_send_to(&mut self.bus, remote, buffer)?;