diff --git a/crates/core/src/client_events/combinator.rs b/crates/core/src/client_events/combinator.rs index 7d4ef59f0..07563c0f1 100644 --- a/crates/core/src/client_events/combinator.rs +++ b/crates/core/src/client_events/combinator.rs @@ -68,9 +68,12 @@ impl super::ClientEventsProxy for ClientEventsCombinator { // this receiver ain't awaiting, queue a new one // SAFETY: is safe here to extend the lifetime since clients are required to be 'static // and we take ownership, so they will be alive for the duration of the program + let f = Box::pin(self.hosts_rx[i].recv()) + as Pin + Send + Sync + '_>>; let new_pend = unsafe { - std::mem::transmute(Box::pin(self.hosts_rx[i].recv()) - as Pin + Send + Sync + '_>>) + std::mem::transmute::<_, Pin + Send + Sync + '_>>>( + f, + ) }; *fut = Some(new_pend); }