diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-09-22 15:46:07 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-22 15:46:07 +0000 |
| commit | dacbc9acd5969d3ef0dda8825c960e909008ce83 (patch) | |
| tree | 87d150bf3398969d4e8cec4f014e8d5ea043ec3a /examples/nrf/src/bin/executor_fairness_test.rs | |
| parent | c1e25067daa53983777807f6d173f1318767b88a (diff) | |
| parent | 10d1ad2343825388277dc54db649c9349a0b6de8 (diff) | |
Merge #963
963: Remove some uses of the `futures` crate r=Dirbaio a=Dirbaio
- use `Future` from `core`
- `poll_fn` is now stable in `core` since Rust 1.64 (out today)
- Use `join` from `embassy-futures`.
Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'examples/nrf/src/bin/executor_fairness_test.rs')
| -rw-r--r-- | examples/nrf/src/bin/executor_fairness_test.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/nrf/src/bin/executor_fairness_test.rs b/examples/nrf/src/bin/executor_fairness_test.rs index 9ae030d07..2a28f2763 100644 --- a/examples/nrf/src/bin/executor_fairness_test.rs +++ b/examples/nrf/src/bin/executor_fairness_test.rs | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use core::future::poll_fn; | ||
| 5 | use core::task::Poll; | 6 | use core::task::Poll; |
| 6 | 7 | ||
| 7 | use defmt::{info, unwrap}; | 8 | use defmt::{info, unwrap}; |
| @@ -26,7 +27,7 @@ async fn run2() { | |||
| 26 | 27 | ||
| 27 | #[embassy_executor::task] | 28 | #[embassy_executor::task] |
| 28 | async fn run3() { | 29 | async fn run3() { |
| 29 | futures::future::poll_fn(|cx| { | 30 | poll_fn(|cx| { |
| 30 | cx.waker().wake_by_ref(); | 31 | cx.waker().wake_by_ref(); |
| 31 | Poll::<()>::Pending | 32 | Poll::<()>::Pending |
| 32 | }) | 33 | }) |
