Skip to content

Commit

Permalink
fix clippy warning on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed May 16, 2024
1 parent ab85cd6 commit aea123a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/g3-socket/src/raw/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use super::RawSocket;
impl RawSocket {
pub fn sendmsg(&self, iov: &[IoSlice<'_>], target: Option<SocketAddr>) -> io::Result<usize> {
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
};
Expand Down

0 comments on commit aea123a

Please sign in to comment.