@@ -34,14 +34,14 @@ pub fn spawn_async_with_fds<P: AsRef<std::path::Path>, T: AsRawFd, U: AsRawFd, V
34
34
stderr_fd : V ,
35
35
) -> Result < Pid , Error > {
36
36
let child_setup_data: Box_ < Option < Box_ < dyn FnOnce ( ) + ' static > > > = Box_ :: new ( child_setup) ;
37
- unsafe extern "C" fn child_setup_func < P : AsRef < std :: path :: Path > > ( user_data : ffi:: gpointer ) {
37
+ unsafe extern "C" fn child_setup_func ( user_data : ffi:: gpointer ) {
38
38
let callback: Box_ < Option < Box_ < dyn FnOnce ( ) + ' static > > > =
39
39
Box_ :: from_raw ( user_data as * mut _ ) ;
40
40
let callback = ( * callback) . expect ( "cannot get closure..." ) ;
41
41
callback ( )
42
42
}
43
43
let child_setup = if child_setup_data. is_some ( ) {
44
- Some ( child_setup_func :: < P > as _ )
44
+ Some ( child_setup_func as _ )
45
45
} else {
46
46
None
47
47
} ;
@@ -144,14 +144,14 @@ pub fn spawn_async_with_pipes<
144
144
child_setup : Option < Box_ < dyn FnOnce ( ) + ' static > > ,
145
145
) -> Result < ( Pid , T , U , V ) , Error > {
146
146
let child_setup_data: Box_ < Option < Box_ < dyn FnOnce ( ) + ' static > > > = Box_ :: new ( child_setup) ;
147
- unsafe extern "C" fn child_setup_func < P : AsRef < std :: path :: Path > > ( user_data : ffi:: gpointer ) {
147
+ unsafe extern "C" fn child_setup_func ( user_data : ffi:: gpointer ) {
148
148
let callback: Box_ < Option < Box_ < dyn FnOnce ( ) + ' static > > > =
149
149
Box_ :: from_raw ( user_data as * mut _ ) ;
150
150
let callback = ( * callback) . expect ( "cannot get closure..." ) ;
151
151
callback ( )
152
152
}
153
153
let child_setup = if child_setup_data. is_some ( ) {
154
- Some ( child_setup_func :: < P > as _ )
154
+ Some ( child_setup_func as _ )
155
155
} else {
156
156
None
157
157
} ;
0 commit comments