Skip to content

Commit

Permalink
Fix new cargo fmt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pdh11 committed Apr 15, 2024
1 parent fd6d254 commit 25683d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl<SpiBus: Bus, HostImpl: Host> 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.
Expand Down
4 changes: 2 additions & 2 deletions src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down Expand Up @@ -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)?;
Expand Down

0 comments on commit 25683d6

Please sign in to comment.