Skip to content

Commit

Permalink
Fix clippy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
iduartgomez committed Jul 18, 2024
1 parent 2625ac3 commit 72d4b69
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/core/src/client_events/combinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ impl<const N: usize> super::ClientEventsProxy for ClientEventsCombinator<N> {
// 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<Box<dyn Future<Output = _> + Send + Sync + '_>>;
let new_pend = unsafe {
std::mem::transmute(Box::pin(self.hosts_rx[i].recv())
as Pin<Box<dyn Future<Output = _> + Send + Sync + '_>>)
std::mem::transmute::<_, Pin<Box<dyn Future<Output = _> + Send + Sync + '_>>>(
f,
)
};
*fut = Some(new_pend);
}
Expand Down

0 comments on commit 72d4b69

Please sign in to comment.