Use new Rust CStr constant (#1993)
This commit is contained in:
parent
63a6d1aac0
commit
aaafe1fc6c
@ -118,7 +118,7 @@ pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
|||||||
#[cfg(any(windows, unix))]
|
#[cfg(any(windows, unix))]
|
||||||
unsafe {
|
unsafe {
|
||||||
let s = CString::new(s).unwrap();
|
let s = CString::new(s).unwrap();
|
||||||
printf(b"%s\n\0".as_ptr().cast(), s.as_ptr());
|
printf(c"%s\n".as_ptr().cast(), s.as_ptr());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user