Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace ready! with std::task::ready #6804

Merged
merged 8 commits into from
Aug 29, 2024
Merged

Conversation

hmaka
Copy link
Contributor

@hmaka hmaka commented Aug 28, 2024

Tokio's MSRV now supports the std::task:ready macro. So the tokio ready! macro can be replaced with that.

Motivation

Tokio's MSRV is 1.70.0. std::task::ready! was introduced in 1.64.0 and has identical implementation to tokio's ready! macro.
std::task::ready! can be used instead.
Thanks @mox692 for suggesting this change!

Solution

This PR removes the tokio ready! and replaces it with std::task:ready!

tokio's MSRV now supports the std::task:ready macro. So the tokio ready!
macro can be replaced with that.
@github-actions github-actions bot added R-loom-current-thread Run loom current-thread tests on this PR R-loom-multi-thread Run loom multi-thread tests on this PR R-loom-multi-thread-alt Run loom multi-thread alt tests on this PR R-loom-sync Run loom sync tests on this PR labels Aug 28, 2024
@hmaka
Copy link
Contributor Author

hmaka commented Aug 28, 2024

I missed importing std::task::ready in a few different places. Going to try find a comprehensive way to find all the places and fix tomorrow.

@Darksonn Darksonn added the A-tokio Area: The main tokio crate label Aug 28, 2024
@Darksonn
Copy link
Contributor

The changes you have so far look good. Let me know when you've replaced all of them.

@hmaka
Copy link
Contributor Author

hmaka commented Aug 29, 2024

I also replaced tokio-stream's read macro. Also replaced future::ready and future_core::ready.

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.

LGTM, thank you!

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thank you.

@Darksonn Darksonn merged commit 11f66f4 into tokio-rs:master Aug 29, 2024
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate R-loom-current-thread Run loom current-thread tests on this PR R-loom-multi-thread Run loom multi-thread tests on this PR R-loom-multi-thread-alt Run loom multi-thread alt tests on this PR R-loom-sync Run loom sync tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants