Skip to content

util: Use owned token in pending_only_on_first_poll_with_cancellation_token_owned_test#7613

Merged
mox692 merged 1 commit intotokio-rs:masterfrom
martin-g:util-future-test-owned-cancellation-token
Sep 15, 2025
Merged

util: Use owned token in pending_only_on_first_poll_with_cancellation_token_owned_test#7613
mox692 merged 1 commit intotokio-rs:masterfrom
martin-g:util-future-test-owned-cancellation-token

Conversation

@martin-g
Copy link
Member

Motivation

The name of the test suggests that it should test the with_cancellation_token**_owned**() extension method.

The new test has been introduced with 0e5c5d6#diff-1a65d95f2c318eb9684e46133805c20a0037726ce9ac14f29fb44f156a9726f1R250

Solution

Use the with_cancellation_token**_owned**() method and pass a owned token (rc clone).

…st to use an owned cancellation token

The name of the test suggests that it should test the
with_cancellation_token_owned() extension method
@martin-g
Copy link
Member Author

CC @bitcapybara

Copy link
Member

@mox692 mox692 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mox692 mox692 merged commit 86de2e3 into tokio-rs:master Sep 15, 2025
91 checks passed
@martin-g martin-g deleted the util-future-test-owned-cancellation-token branch September 15, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants