Use u32::MAX instead of u32::max_value

Co-authored-by: lzutao <taolzu@gmail.com>
This commit is contained in:
Joe Ellis 2020-08-05 15:47:45 +01:00 committed by Joe Ellis
parent be2637aba7
commit cbcf3877b5

View File

@ -42,7 +42,7 @@ pub mod impl_linux {
// Trivial sanity checks. // Trivial sanity checks.
assert!(mem::size_of::<u32>() <= mem::size_of::<usize>()); 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_size = ucred_size as u32;
let mut ucred: ucred = ucred { pid: 1, uid: 1, gid: 1 }; let mut ucred: ucred = ucred { pid: 1, uid: 1, gid: 1 };