Replace process.read_ptr usage with ptr.read

This commit is contained in:
a2x
2024-03-29 16:10:37 +10:00
parent c00ac5dbb7
commit 621ec605c6
7 changed files with 40 additions and 43 deletions

View File

@@ -212,13 +212,13 @@ impl Results {
}
pub fn format_module_name(module_name: &String) -> String {
let extension = match env::consts::OS {
let file_ext = match env::consts::OS {
"linux" => ".so",
"windows" => ".dll",
_ => panic!("unsupported os"),
};
module_name.strip_suffix(extension).unwrap().to_string()
module_name.strip_suffix(file_ext).unwrap().to_string()
}
#[inline]