Skip to content

Commit

Permalink
Fix Clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed Aug 29, 2023
1 parent 60e59ee commit a465aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ impl<'addr, 'bufs, 'control> MsgHdrMut<'addr, 'bufs, 'control> {
///
/// Corresponds to setting `msg_name` and `msg_namelen` on Unix and `name`
/// and `namelen` on Windows.
#[allow(clippy::needless_pass_by_ref_mut)]
pub fn with_addr(mut self, addr: &'addr mut SockAddr) -> Self {
sys::set_msghdr_name(&mut self.inner, addr);
self
Expand Down
2 changes: 1 addition & 1 deletion src/sys/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@ impl crate::Socket {
.map(|_| {
let buf = &payload[..len as usize];
// TODO: use `MaybeUninit::slice_assume_init_ref` once stable.
unsafe { &*(buf as *const [_] as *const [u8]) }.into()
unsafe { &*(buf as *const [u8]) }.into()
})
}

Expand Down

0 comments on commit a465aec

Please sign in to comment.