@@ -6,7 +6,7 @@ use fcntl::{fcntl, OFlag, O_CLOEXEC, FD_CLOEXEC};
6
6
use fcntl:: FcntlArg :: F_SETFD ;
7
7
use libc:: { self , c_char, c_void, c_int, c_long, c_uint, size_t, pid_t, off_t,
8
8
uid_t, gid_t, mode_t} ;
9
- use std:: { self , fmt, mem} ;
9
+ use std:: { fmt, mem, ptr } ;
10
10
use std:: ffi:: { CString , CStr , OsString , OsStr } ;
11
11
use std:: os:: unix:: ffi:: { OsStringExt , OsStrExt } ;
12
12
use std:: os:: unix:: io:: RawFd ;
@@ -553,9 +553,6 @@ pub fn chown<P: ?Sized + NixPath>(path: &P, owner: Option<Uid>, group: Option<Gi
553
553
}
554
554
555
555
fn to_exec_array ( args : & [ CString ] ) -> Vec < * const c_char > {
556
- use std:: ptr;
557
- use libc:: c_char;
558
-
559
556
let mut args_p: Vec < * const c_char > = args. iter ( ) . map ( |s| s. as_ptr ( ) ) . collect ( ) ;
560
557
args_p. push ( ptr:: null ( ) ) ;
561
558
args_p
@@ -1056,7 +1053,7 @@ pub fn setgid(gid: Gid) -> Result<()> {
1056
1053
#[ cfg( not( any( target_os = "ios" , target_os = "macos" ) ) ) ]
1057
1054
pub fn getgroups ( ) -> Result < Vec < Gid > > {
1058
1055
// First get the number of groups so we can size our Vec
1059
- let ret = unsafe { libc:: getgroups ( 0 , std :: ptr:: null_mut ( ) ) } ;
1056
+ let ret = unsafe { libc:: getgroups ( 0 , ptr:: null_mut ( ) ) } ;
1060
1057
1061
1058
// Now actually get the groups. We try multiple times in case the number of
1062
1059
// groups has changed since the first call to getgroups() and the buffer is
0 commit comments