chore: address 1.79 clippy lints

This commit is contained in:
Kirill Chibisov
2024-06-15 15:26:26 +03:00
parent 1745b01502
commit 96388f4f6b
15 changed files with 30 additions and 30 deletions

View File

@@ -53,7 +53,11 @@ impl<T> EventLoop<T> {
// SAFETY: The `transmute` is necessary because `run()` requires `'static`. This is safe
// because this function will never return and all resources not cleaned up by the point we
// `throw` will leak, making this actually `'static`.
let handler = unsafe { std::mem::transmute(handler) };
let handler = unsafe {
std::mem::transmute::<Box<dyn FnMut(Event<()>)>, Box<dyn FnMut(Event<()>) + 'static>>(
handler,
)
};
self.elw.p.run(handler, false);
// Throw an exception to break out of Rust execution and use unreachable to tell the