@@ -1526,7 +1526,7 @@ pub fn getgroups() -> Result<Vec<Gid>> {
15261526 // equal to the value of {NGROUPS_MAX} + 1.
15271527 let ngroups_max = match sysconf( SysconfVar :: NGROUPS_MAX ) {
15281528 Ok ( Some ( n) ) => ( n + 1 ) as usize ,
1529- Ok ( None ) | Err ( _) => < usize > :: max_value ( ) ,
1529+ Ok ( None ) | Err ( _) => usize :: MAX ,
15301530 } ;
15311531
15321532 // Next, get the number of groups so we can size our Vec
@@ -1660,7 +1660,7 @@ pub fn setgroups(groups: &[Gid]) -> Result<()> {
16601660pub fn getgrouplist( user: & CStr , group: Gid ) -> Result <Vec <Gid >> {
16611661 let ngroups_max = match sysconf( SysconfVar :: NGROUPS_MAX ) {
16621662 Ok ( Some ( n) ) => n as c_int,
1663- Ok ( None ) | Err ( _) => < c_int> :: max_value ( ) ,
1663+ Ok ( None ) | Err ( _) => c_int:: MAX ,
16641664 } ;
16651665 use std:: cmp:: min;
16661666 let mut groups = Vec :: <Gid >:: with_capacity( min( ngroups_max, 8 ) as usize ) ;
@@ -2867,9 +2867,9 @@ mod getres {
28672867 ///
28682868 #[ inline]
28692869 pub fn getresuid( ) -> Result <ResUid > {
2870- let mut ruid = libc:: uid_t:: max_value ( ) ;
2871- let mut euid = libc:: uid_t:: max_value ( ) ;
2872- let mut suid = libc:: uid_t:: max_value ( ) ;
2870+ let mut ruid = libc:: uid_t:: MAX ;
2871+ let mut euid = libc:: uid_t:: MAX ;
2872+ let mut suid = libc:: uid_t:: MAX ;
28732873 let res = unsafe { libc:: getresuid( & mut ruid, & mut euid, & mut suid) } ;
28742874
28752875 Errno :: result( res) . map( |_| ResUid {
@@ -2890,9 +2890,9 @@ mod getres {
28902890 ///
28912891 #[ inline]
28922892 pub fn getresgid( ) -> Result <ResGid > {
2893- let mut rgid = libc:: gid_t:: max_value ( ) ;
2894- let mut egid = libc:: gid_t:: max_value ( ) ;
2895- let mut sgid = libc:: gid_t:: max_value ( ) ;
2893+ let mut rgid = libc:: gid_t:: MAX ;
2894+ let mut egid = libc:: gid_t:: MAX ;
2895+ let mut sgid = libc:: gid_t:: MAX ;
28962896 let res = unsafe { libc:: getresgid( & mut rgid, & mut egid, & mut sgid) } ;
28972897
28982898 Errno :: result( res) . map( |_| ResGid {
0 commit comments