-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
tokio's MSRV now supports the std::task:ready macro. So the tokio ready! macro can be replaced with that.
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. |
The changes you have so far look good. Let me know when you've replaced all of them. |
I also replaced tokio-stream's read macro. Also replaced future::ready and future_core::ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
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!