We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a326bd6 + 781731b commit 712793eCopy full SHA for 712793e
src/memory_buffer.rs
@@ -26,7 +26,7 @@ impl MemoryBuffer {
26
}
27
28
pub fn create_from_file(path: &Path) -> Result<Self, LLVMString> {
29
- let path = path.to_str().expect("Did not find a valid Unicode path string");
+ let path = CString::new(path.to_str().expect("Did not find a valid Unicode path string")).expect("Failed to convert to CString");
30
let mut memory_buffer = ptr::null_mut();
31
let mut err_string = unsafe { zeroed() };
32
0 commit comments