fix a couple rust 2024 lints introduced in rust 1.82.0

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-12 10:22:30 -05:00
parent e0446181c5
commit 76a5a67b6f
No known key found for this signature in database
5 changed files with 70 additions and 70 deletions

View file

@ -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() };