]> git.lizzy.rs Git - rust.git/commitdiff
[net] clippy: needless_update
authorwcampbell <wcampbell1995@gmail.com>
Tue, 13 Oct 2020 21:58:29 +0000 (17:58 -0400)
committerwcampbell <wcampbell1995@gmail.com>
Tue, 13 Oct 2020 21:58:29 +0000 (17:58 -0400)
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

library/std/src/net/addr.rs

index 63de87128340f38d4cb9ae01a63788dcdd8122ff..549192c9d30fc20105d18af73a103d32ef328ea0 100644 (file)
@@ -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() }
             },
         }
     }