use &[c_char] instead of &[i8] in c_char_arr_to_string

This commit is contained in:
2025-09-13 12:02:19 +01:00
parent 762a3b9b26
commit 941868dcc8
+2 -1
View File
@@ -1,4 +1,5 @@
use std::{
ffi::c_char,
os::windows::process::CommandExt,
path::{Path, PathBuf},
process::Command,
@@ -112,7 +113,7 @@ fn get_exe_full_path(process_entry: &PROCESSENTRY32) -> Option<PathBuf> {
})
}
fn c_char_arr_to_string(arr: &[i8]) -> String {
fn c_char_arr_to_string(arr: &[c_char]) -> String {
arr.iter()
.take_while(|&&b| b != 0)
.map(|&b| b as u8 as char)