Skip to content

Commit

Permalink
Remove unused instant return value from CaptureFuture (vercel/turbo…
Browse files Browse the repository at this point in the history
…repo#8758)

### Description

Appears to be unused.

### Testing Instructions

```
cargo check
cargo check --tests
```
  • Loading branch information
bgw authored Jul 16, 2024
1 parent 019c408 commit 7555e14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/turbo-tasks/src/capture_future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn add_allocation_info(alloc_info: AllocationInfo) {
}

impl<T, F: Future<Output = T>> Future for CaptureFuture<T, F> {
type Output = (T, Duration, Instant, usize);
type Output = (T, Duration, usize);

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let this = self.project();
Expand All @@ -68,7 +68,7 @@ impl<T, F: Future<Output = T>> Future for CaptureFuture<T, F> {
let (duration, allocations, deallocations) = *this.cell.lock().unwrap();
let memory_usage = (*this.allocations + allocations)
.saturating_sub(*this.deallocations + deallocations);
Poll::Ready((r, *this.duration + duration, start + elapsed, memory_usage))
Poll::Ready((r, *this.duration + duration, memory_usage))
}
Poll::Pending => Poll::Pending,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/turbo-tasks/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl<B: Backend + 'static> TurboTasks<B> {
};

async {
let (result, duration, _instant, memory_usage) =
let (result, duration, memory_usage) =
CaptureFuture::new(AssertUnwindSafe(future).catch_unwind())
.await;

Expand Down

0 comments on commit 7555e14

Please sign in to comment.