fix a couple rust 2024 lints introduced in rust 1.82.0
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -59,7 +59,7 @@ pub fn memory_stats() -> Option<String> {
|
||||
Some(format!("<pre><code>{str}</code></pre>"))
|
||||
}
|
||||
|
||||
extern "C" fn malloc_stats_cb(opaque: *mut c_void, msg: *const c_char) {
|
||||
unsafe extern "C" fn malloc_stats_cb(opaque: *mut c_void, msg: *const c_char) {
|
||||
// SAFETY: we have to trust the opaque points to our String
|
||||
let res: &mut String = unsafe { opaque.cast::<String>().as_mut().unwrap() };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user