Skip to content

Commit

Permalink
Simplify future creation
Browse files Browse the repository at this point in the history
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
  • Loading branch information
tglane and Darksonn committed Jun 9, 2024
1 parent 1f1c78d commit e1340e2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tokio-util/src/sync/cancellation_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,7 @@ impl CancellationToken {
}

RunUntilCancelledFuture {
cancellation: WaitForCancellationFuture {
cancellation_token: self,
future: self.inner.notified(),
},
cancellation: self.cancelled(),
future: fut,
}
.await
Expand Down

0 comments on commit e1340e2

Please sign in to comment.