Skip to content

Commit 86de2e3

Browse files
authored
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
1 parent 6dc4f85 commit 86de2e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tokio-util/tests/future.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ fn pending_fut_with_owned_token_cancelled_test() {
250250
fn pending_only_on_first_poll_with_cancellation_token_owned_test() {
251251
let (waker, wake_count) = new_count_waker();
252252
let token = CancellationToken::new();
253-
let fut = ReadyOnTheSecondPollFuture::default().with_cancellation_token(&token);
253+
let fut = ReadyOnTheSecondPollFuture::default().with_cancellation_token_owned(token.clone());
254254
pin!(fut);
255255

256256
// first poll, ReadyOnTheSecondPollFuture returned Pending

0 commit comments

Comments
 (0)