From aec0fe8f356f546a1f76c2168692e2710fad2ed8 Mon Sep 17 00:00:00 2001 From: Jonty Date: Sat, 20 Jan 2024 15:27:44 +0000 Subject: [PATCH] use platform independent c_char type over u8 or i8 to represent CString pointer --- src/system.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system.rs b/src/system.rs index aa7e80b..f75b738 100644 --- a/src/system.rs +++ b/src/system.rs @@ -127,7 +127,7 @@ impl System { .iter() .map(|s| CString::new(s.clone()).map_err(|e| anyhow!("CString::new: {}", e))) .collect::, Error>>()?; - let c_options_ptrs: Vec<*const u8> = c_options.iter().map(|c| c.as_ptr()).collect(); + let c_options_ptrs: Vec<*const c_char> = c_options.iter().map(|c| c.as_ptr()).collect(); let c_options_ptrs_ptr = c_options_ptrs.as_ptr(); let option_titles = c_options_ptrs_ptr as *mut *const c_char; let wrapped_callback = Box::new(callback);