mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
util: fix pending_only_on_first_poll_with_cancellation_token_owned_test to use an owned cancellation token (#7613)
The name of the test suggests that it should test the with_cancellation_token_owned() extension method
This commit is contained in:
@@ -250,7 +250,7 @@ fn pending_fut_with_owned_token_cancelled_test() {
|
|||||||
fn pending_only_on_first_poll_with_cancellation_token_owned_test() {
|
fn pending_only_on_first_poll_with_cancellation_token_owned_test() {
|
||||||
let (waker, wake_count) = new_count_waker();
|
let (waker, wake_count) = new_count_waker();
|
||||||
let token = CancellationToken::new();
|
let token = CancellationToken::new();
|
||||||
let fut = ReadyOnTheSecondPollFuture::default().with_cancellation_token(&token);
|
let fut = ReadyOnTheSecondPollFuture::default().with_cancellation_token_owned(token.clone());
|
||||||
pin!(fut);
|
pin!(fut);
|
||||||
|
|
||||||
// first poll, ReadyOnTheSecondPollFuture returned Pending
|
// first poll, ReadyOnTheSecondPollFuture returned Pending
|
||||||
|
|||||||
Reference in New Issue
Block a user