Skip to content

Commit a465aec

Browse files
committed
Fix Clippy warnings
1 parent 60e59ee commit a465aec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ impl<'addr, 'bufs, 'control> MsgHdrMut<'addr, 'bufs, 'control> {
680680
///
681681
/// Corresponds to setting `msg_name` and `msg_namelen` on Unix and `name`
682682
/// and `namelen` on Windows.
683+
#[allow(clippy::needless_pass_by_ref_mut)]
683684
pub fn with_addr(mut self, addr: &'addr mut SockAddr) -> Self {
684685
sys::set_msghdr_name(&mut self.inner, addr);
685686
self

src/sys/unix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2711,7 +2711,7 @@ impl crate::Socket {
27112711
.map(|_| {
27122712
let buf = &payload[..len as usize];
27132713
// TODO: use `MaybeUninit::slice_assume_init_ref` once stable.
2714-
unsafe { &*(buf as *const [_] as *const [u8]) }.into()
2714+
unsafe { &*(buf as *const [u8]) }.into()
27152715
})
27162716
}
27172717

0 commit comments

Comments
 (0)