Skip to content

Commit

Permalink
fix(turbo-tasks): Fix building with --features=turbo-tasks/hanging_de…
Browse files Browse the repository at this point in the history
…tection (#75584)

Try building with and without the feature enabled:

```
cargo check
cargo check --features=turbo-tasks/hanging_detection
```
  • Loading branch information
bgw authored Feb 3, 2025
1 parent 0175834 commit f9ba41e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions turbopack/crates/turbo-tasks/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use std::{
fmt::{Debug, Formatter},
future::Future,
mem::replace,
pin::Pin,
};

#[cfg(feature = "hanging_detection")]
Expand Down Expand Up @@ -140,7 +141,7 @@ impl Future for EventListener {
type Output = ();

fn poll(
self: std::pin::Pin<&mut Self>,
self: Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Self::Output> {
let listener = unsafe { self.map_unchecked_mut(|s| &mut s.listener) };
Expand Down Expand Up @@ -176,7 +177,7 @@ impl Future for EventListener {
type Output = ();

fn poll(
mut self: std::pin::Pin<&mut Self>,
mut self: Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Self::Output> {
while let Some(future) = self.future.as_mut() {
Expand Down

0 comments on commit f9ba41e

Please # to comment.