File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44use libcc2rs:: * ;
55
66fn f4 ( a0 : Ptr < u8 > ) -> i32 {
7- match nix:: unistd:: unlink (
8- :: std:: ffi:: CString :: new ( a0. to_c_string_iterator ( ) . collect :: < Vec < u8 > > ( ) )
9- . unwrap ( )
10- . as_c_str ( ) ,
11- ) {
7+ match nix:: unistd:: unlink ( a0. to_rust_string ( ) . as_str ( ) ) {
128 Ok ( ( ) ) => 0 ,
139 Err ( __e) => {
1410 libcc2rs:: cpp2rust_errno ( ) . write ( __e as i32 ) ;
Original file line number Diff line number Diff line change @@ -29,15 +29,7 @@ fn main_0() -> i32 {
2929 ) ;
3030 ( * ofs. borrow_mut ( ) ) . try_clone ( ) . unwrap ( )
3131 } ;
32- match nix:: unistd:: unlink (
33- :: std:: ffi:: CString :: new (
34- ( file. as_pointer ( ) as Ptr < u8 > )
35- . to_c_string_iterator ( )
36- . collect :: < Vec < u8 > > ( ) ,
37- )
38- . unwrap ( )
39- . as_c_str ( ) ,
40- ) {
32+ match nix:: unistd:: unlink ( ( file. as_pointer ( ) as Ptr < u8 > ) . to_rust_string ( ) . as_str ( ) ) {
4133 Ok ( ( ) ) => 0 ,
4234 Err ( __e) => {
4335 libcc2rs:: cpp2rust_errno ( ) . write ( __e as i32 ) ;
You can’t perform that action at this time.
0 commit comments