Skip to content

Commit

Permalink
Clippy: Don't right shift u32 by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Oct 4, 2020
1 parent 800619b commit b6e651c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ fn parse_addressport_str(s: &str) -> ProcResult<SocketAddr> {

let ip = Ipv6Addr::new(
((ip_a >> 16) & 0xffff) as u16,
((ip_a >> 0) & 0xffff) as u16,
(ip_a & 0xffff) as u16,
((ip_b >> 16) & 0xffff) as u16,
((ip_b >> 0) & 0xffff) as u16,
(ip_b & 0xffff) as u16,
((ip_c >> 16) & 0xffff) as u16,
((ip_c >> 0) & 0xffff) as u16,
(ip_c & 0xffff) as u16,
((ip_d >> 16) & 0xffff) as u16,
((ip_d >> 0) & 0xffff) as u16,
(ip_d & 0xffff) as u16,
);

Ok(SocketAddr::V6(SocketAddrV6::new(ip, port, 0, 0)))
Expand Down

0 comments on commit b6e651c

Please sign in to comment.