chore: address 1.79 clippy lints

This commit is contained in:
Kirill Chibisov 2024-06-15 15:26:26 +03:00 committed by GitHub
parent 3b4e064a07
commit 078b46720b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 30 additions and 30 deletions

View file

@ -68,7 +68,12 @@ impl<T> Dispatcher<T> {
// SAFETY: The `transmute` is necessary because `Closure` requires `'static`. This is
// safe because this function won't return until `f` has finished executing. See
// `Self::new()`.
let closure = Closure(unsafe { std::mem::transmute(closure) });
let closure = Closure(unsafe {
std::mem::transmute::<
Box<dyn FnOnce(&T) + Send>,
Box<dyn FnOnce(&T) + Send + 'static>,
>(closure)
});
self.0.send(closure);