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(maitake): use stdlib pin! and poll_fn #486

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Sep 4, 2024

Currently, we use the versions of pin_mut! and future::poll_fn from the futures crate. Now, core::pin::pin! and core::future::poll_fn are stable, so we can just use the stdlib versions of these APIs instead.

This allows us to reduce our dev dependencies on the futures crates down to just depending on futures_util in maitake-sync for select_biased!. Reducing the number of dev-deps will hopefully make compiling the tests a little faster. And, the stdlib version of pin! is way nicer than futures::pin_mut! as it can be on the right-hand side of an assignment, rather than requiring an assignment followed by a pin!.

Currently, we use the versions of `pin_mut!`, `future::poll_fn`, and
`future::ready` from the `futures` crate. Now, `core::pin::pin!`,
`core::future::poll_fn`, and `core::future::ready` are stable, so we can
are stable, so we can just use the stdlib versions of these APIs
instead.

This allows us to reduce our dev dependencies on the `futures` crates
down to just depending on `futures_util` in `maitake-sync` for
`select_biased!`. Reducing the number of dev-deps will hopefully make
compiling the tests a little faster. And, the stdlib version of `pin!`
is *way* nicer than `futures::pin_mut!` as it can be on the right-hand
side of an assignment, rather than requiring an assignment followed by a
`pin!`.
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.

1 participant