diff --git a/lib/g3-socket/src/raw/windows.rs b/lib/g3-socket/src/raw/windows.rs index a5d7c8ebf..8f2bb6b01 100644 --- a/lib/g3-socket/src/raw/windows.rs +++ b/lib/g3-socket/src/raw/windows.rs @@ -25,9 +25,9 @@ use super::RawSocket; impl RawSocket { pub fn sendmsg(&self, iov: &[IoSlice<'_>], target: Option) -> io::Result { let msg_hdr = MsgHdr::new().with_buffers(iov); - let target = target.map(|v| SockAddr::from(v)); + let target = target.map(SockAddr::from); let msg_hdr = if let Some(addr) = &target { - msg_hdr.with_addr(&addr) + msg_hdr.with_addr(addr) } else { msg_hdr };