mirror of
https://github.com/chatmail/core.git
synced 2026-05-23 00:36:32 +03:00
Use usize to get pointer size
According to Rust documentation, usize is "The pointer-sized unsigned integer type". This change removes unnecessary libc dependency and makes top_evil_rs script happier.
This commit is contained in:
@@ -79,12 +79,7 @@ pub fn get_info() -> HashMap<&'static str, String> {
|
|||||||
"sqlite_thread_safe",
|
"sqlite_thread_safe",
|
||||||
unsafe { rusqlite::ffi::sqlite3_threadsafe() }.to_string(),
|
unsafe { rusqlite::ffi::sqlite3_threadsafe() }.to_string(),
|
||||||
);
|
);
|
||||||
res.insert(
|
res.insert("arch", (std::mem::size_of::<usize>() * 8).to_string());
|
||||||
"arch",
|
|
||||||
(std::mem::size_of::<*mut libc::c_void>())
|
|
||||||
.wrapping_mul(8)
|
|
||||||
.to_string(),
|
|
||||||
);
|
|
||||||
res.insert("level", "awesome".into());
|
res.insert("level", "awesome".into());
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user