File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ impl WritePipes {
286
286
Entry :: Vacant ( e) => {
287
287
let command: CString = command. try_into ( ) ?;
288
288
let file = unsafe {
289
- let file = libc:: popen ( command. as_ptr ( ) , "w \0 ". as_ptr ( ) as * const i8 ) ;
289
+ let file = libc:: popen ( command. as_ptr ( ) , c"w ". as_ptr ( ) ) ;
290
290
if file. is_null ( ) {
291
291
return Err ( "failed to open pipe" . to_string ( ) ) ;
292
292
}
@@ -351,7 +351,7 @@ impl PipeRecordReader {
351
351
pub fn open ( command : & str ) -> Result < Self , String > {
352
352
let command = CString :: new ( command) . map_err ( |e| e. to_string ( ) ) ?;
353
353
let file = unsafe {
354
- let file = libc:: popen ( command. as_ptr ( ) , "r \0 ". as_ptr ( ) as * const i8 ) ;
354
+ let file = libc:: popen ( command. as_ptr ( ) , c"r ". as_ptr ( ) ) ;
355
355
if file. is_null ( ) {
356
356
return Err ( "failed to open pipe" . to_string ( ) ) ;
357
357
}
You can’t perform that action at this time.
0 commit comments