Skip to content

Commit

Permalink
Remove unused instant return value from CaptureFuture
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Jul 15, 2024
1 parent 99119e2 commit be18ade
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 be18ade

Please sign in to comment.