diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 57055bd77..05bbd07f2 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs @@ -307,32 +307,26 @@ impl Stack { #[cfg(feature = "igmp")] impl Stack { pub(crate) fn join_multicast_group(&self, addr: T) -> Result - where - T: Into + where + T: Into, { let addr = addr.into(); self.with_mut(|s, i| { - s.iface.join_multicast_group( - &mut i.device, - addr, - instant_to_smoltcp(Instant::now()), - ) + s.iface + .join_multicast_group(&mut i.device, addr, instant_to_smoltcp(Instant::now())) }) } pub(crate) fn leave_multicast_group(&self, addr: T) -> Result - where - T: Into + where + T: Into, { let addr = addr.into(); self.with_mut(|s, i| { - s.iface.leave_multicast_group( - &mut i.device, - addr, - instant_to_smoltcp(Instant::now()), - ) + s.iface + .leave_multicast_group(&mut i.device, addr, instant_to_smoltcp(Instant::now())) }) } diff --git a/embassy-net/src/udp.rs b/embassy-net/src/udp.rs index c840eeaa2..a8a426048 100644 --- a/embassy-net/src/udp.rs +++ b/embassy-net/src/udp.rs @@ -50,10 +50,7 @@ impl<'a, D: Driver> UdpSocket<'a, D> { udp::PacketBuffer::new(tx_meta, tx_buffer), )); - Self { - stack, - handle, - } + Self { stack, handle } } pub fn bind(&mut self, endpoint: T) -> Result<(), BindError> @@ -146,15 +143,15 @@ impl<'a, D: Driver> UdpSocket<'a, D> { #[cfg(feature = "igmp")] impl<'a, D: Driver + smoltcp::phy::Device + 'static> UdpSocket<'a, D> { pub fn join_multicast_group(&self, addr: T) -> Result - where - T: Into + where + T: Into, { self.stack.join_multicast_group(addr) } pub fn leave_multicast_group(&self, addr: T) -> Result - where - T: Into + where + T: Into, { self.stack.leave_multicast_group(addr) }