From: wcampbell Date: Tue, 13 Oct 2020 21:58:29 +0000 (-0400) Subject: [net] clippy: needless_update X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=058699d0a2fca02127761f014d0ecfce1c5541ec;p=rust.git [net] clippy: needless_update warning: struct update has no effect, all the fields in the struct have already been specified --> library/std/src/net/addr.rs:367:19 | 367 | ..unsafe { mem::zeroed() } | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(clippy::needless_update)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update --- diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index 63de8712834..549192c9d30 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -364,7 +364,6 @@ pub fn new(ip: Ipv6Addr, port: u16, flowinfo: u32, scope_id: u32) -> SocketAddrV sin6_addr: *ip.as_inner(), sin6_flowinfo: flowinfo, sin6_scope_id: scope_id, - ..unsafe { mem::zeroed() } }, } }