hawkw / mycelium

🍄 an alleged 'operating system'
https://mycelium.elizas.website
MIT License
548 stars 20 forks source link

chore(maitake): use stdlib `pin!` and `poll_fn` #486

Open hawkw opened 2 months ago

hawkw commented 2 months ago

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!.