about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-12 13:10:57 +0000
committerbors <bors@rust-lang.org>2020-06-12 13:10:57 +0000
commit7c78a5f97de07a185eebae5a5de436c80d8ba9d4 (patch)
treee5475f282387bca43e2085d44537fdfbe69ef98d /src/libstd/sys_common
parent59493917be3e87e1dfb44a9ccb66a9f9b17228e6 (diff)
parent77ede48ada25295cb90e520f52c1cbe653982f8a (diff)
downloadrust-7c78a5f97de07a185eebae5a5de436c80d8ba9d4.tar.gz
rust-7c78a5f97de07a185eebae5a5de436c80d8ba9d4.zip
Auto merge of #73276 - Dylan-DPC:rollup-hfd81qw, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #72906 (Migrate to numeric associated consts)
 - #73178 (expand: More precise locations for expansion-time lints)
 - #73225 (Allow inference regions when relating consts)
 - #73236 (Clean up E0666 explanation)
 - #73273 (Fix Zulip pings)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/net.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys_common/net.rs b/src/libstd/sys_common/net.rs
index 1c03bc92344..81a5ef95e82 100644
--- a/src/libstd/sys_common/net.rs
+++ b/src/libstd/sys_common/net.rs
@@ -271,7 +271,7 @@ impl TcpStream {
     }
 
     pub fn write(&self, buf: &[u8]) -> io::Result<usize> {
-        let len = cmp::min(buf.len(), <wrlen_t>::max_value() as usize) as wrlen_t;
+        let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
         let ret = cvt(unsafe {
             c::send(*self.inner.as_inner(), buf.as_ptr() as *const c_void, len, MSG_NOSIGNAL)
         })?;
@@ -502,7 +502,7 @@ impl UdpSocket {
     }
 
     pub fn send_to(&self, buf: &[u8], dst: &SocketAddr) -> io::Result<usize> {
-        let len = cmp::min(buf.len(), <wrlen_t>::max_value() as usize) as wrlen_t;
+        let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
         let (dstp, dstlen) = dst.into_inner();
         let ret = cvt(unsafe {
             c::sendto(
@@ -641,7 +641,7 @@ impl UdpSocket {
     }
 
     pub fn send(&self, buf: &[u8]) -> io::Result<usize> {
-        let len = cmp::min(buf.len(), <wrlen_t>::max_value() as usize) as wrlen_t;
+        let len = cmp::min(buf.len(), <wrlen_t>::MAX as usize) as wrlen_t;
         let ret = cvt(unsafe {
             c::send(*self.inner.as_inner(), buf.as_ptr() as *const c_void, len, MSG_NOSIGNAL)
         })?;