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:
Martin Grigorov
2025-09-15 16:22:42 +09:00
committed by GitHub
parent 6dc4f85f0b
commit 86de2e306b
+1 -1
View File
@@ -250,7 +250,7 @@ fn pending_fut_with_owned_token_cancelled_test() {
fn pending_only_on_first_poll_with_cancellation_token_owned_test() {
let (waker, wake_count) = new_count_waker();
let token = CancellationToken::new();
let fut = ReadyOnTheSecondPollFuture::default().with_cancellation_token(&token);
let fut = ReadyOnTheSecondPollFuture::default().with_cancellation_token_owned(token.clone());
pin!(fut);
// first poll, ReadyOnTheSecondPollFuture returned Pending