diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-12-29 18:29:46 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-12-29 18:29:46 +0300 |
commit | 38ecd4307419bb0d7a53189fa3ca037a38fa6b6c (patch) | |
tree | 4dabedf6d5c82c6fe637b71f399f172f75f0b4ec /generic/threadshare | |
parent | 7e1181ab84617c46a92becafa29f3002619c3231 (diff) |
Use typed integer literals instead of casting
Diffstat (limited to 'generic/threadshare')
-rw-r--r-- | generic/threadshare/tests/udpsrc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/threadshare/tests/udpsrc.rs b/generic/threadshare/tests/udpsrc.rs index 44d7b96ca..18c074bce 100644 --- a/generic/threadshare/tests/udpsrc.rs +++ b/generic/threadshare/tests/udpsrc.rs @@ -57,7 +57,7 @@ fn test_push() { let socket = net::UdpSocket::bind("0.0.0.0:0").unwrap(); let ipaddr = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)); - let dest = SocketAddr::new(ipaddr, 5000 as u16); + let dest = SocketAddr::new(ipaddr, 5000u16); for _ in 0..3 { socket.send_to(&buffer, dest).unwrap(); @@ -149,7 +149,7 @@ fn test_socket_reuse() { let socket = net::UdpSocket::bind("0.0.0.0:0").unwrap(); let ipaddr = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)); - let dest = SocketAddr::new(ipaddr, 6000 as u16); + let dest = SocketAddr::new(ipaddr, 6000u16); for _ in 0..3 { socket.send_to(&buffer, dest).unwrap(); |