about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoe Ellis <joechrisellis@gmail.com>2020-08-05 15:47:45 +0100
committerJoe Ellis <joe.ellis@arm.com>2020-09-14 10:31:56 +0100
commitcbcf3877b528ff0304e3da6da03349c8a30beed5 (patch)
tree811460ba41eada67b678db1b74d0ab11afdfa4c9
parentbe2637aba7e12474a7044b5ed9ba4a6978d46462 (diff)
downloadrust-cbcf3877b528ff0304e3da6da03349c8a30beed5.tar.gz
rust-cbcf3877b528ff0304e3da6da03349c8a30beed5.zip
Use `u32::MAX` instead of `u32::max_value`
Co-authored-by: lzutao <taolzu@gmail.com>
-rw-r--r--library/std/src/sys/unix/ext/ucred.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/ext/ucred.rs b/library/std/src/sys/unix/ext/ucred.rs
index c737a6a34fd..44df834e8d7 100644
--- a/library/std/src/sys/unix/ext/ucred.rs
+++ b/library/std/src/sys/unix/ext/ucred.rs
@@ -42,7 +42,7 @@ pub mod impl_linux {
 
         // Trivial sanity checks.
         assert!(mem::size_of::<u32>() <= mem::size_of::<usize>());
-        assert!(ucred_size <= u32::max_value() as usize);
+        assert!(ucred_size <= u32::MAX as usize);
 
         let mut ucred_size = ucred_size as u32;
         let mut ucred: ucred = ucred { pid: 1, uid: 1, gid: 1 };