diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-05-09 19:08:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 19:08:17 +0000 |
commit | b13b7d18e0d2f4a8c05e41576c7ebf26d6dbfb28 (patch) | |
tree | 35408723464069562e9f7d3106bf5268b806e765 | |
parent | 71a997a6b5e58a5108f9c0cd27dc0ca4f9b1ed52 (diff) | |
parent | 918a5abb67156a9a9d3785d7a5dfaf2cb35c74c9 (diff) | |
download | nix-b13b7d18e0d2f4a8c05e41576c7ebf26d6dbfb28.zip |
Merge #2033
2033: remove unused mut from two variable declarations in sys/socket/mod.rs r=asomers a=inglorion
This addresses diagnostics like:
error: variable does not need to be mutable
--> src/sys/socket/mod.rs:1537:13
|
1537 | let mut p = &mut mmsghdr.msg_hdr;
Co-authored-by: Bob Haarman <inglorion@google.com>
-rw-r--r-- | src/sys/socket/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index a953059b..9b6f18ef 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -1534,7 +1534,7 @@ pub fn sendmmsg<'a, XS, AS, C, I, S>( for (i, ((slice, addr), mmsghdr)) in slices.into_iter().zip(addrs.as_ref()).zip(data.items.iter_mut() ).enumerate() { - let mut p = &mut mmsghdr.msg_hdr; + let p = &mut mmsghdr.msg_hdr; p.msg_iov = slice.as_ref().as_ptr() as *mut libc::iovec; p.msg_iovlen = slice.as_ref().len() as _; @@ -1687,7 +1687,7 @@ where { let mut count = 0; for (i, (slice, mmsghdr)) in slices.into_iter().zip(data.items.iter_mut()).enumerate() { - let mut p = &mut mmsghdr.msg_hdr; + let p = &mut mmsghdr.msg_hdr; p.msg_iov = slice.as_ref().as_ptr() as *mut libc::iovec; p.msg_iovlen = slice.as_ref().len() as _; count = i + 1; |