| 1 | use futures::executor::block_on; |
|---|---|
| 2 | |
| 3 | async fn my_async_fn() {} |
| 4 | |
| 5 | #[test] |
| 6 | fn pin() { |
| 7 | block_on(async { |
| 8 | let future = my_async_fn(); |
| 9 | tokio::pin!(future); |
| 10 | (&mut future).await |
| 11 | }); |
| 12 | } |
| 13 |
| 1 | use futures::executor::block_on; |
|---|---|
| 2 | |
| 3 | async fn my_async_fn() {} |
| 4 | |
| 5 | #[test] |
| 6 | fn pin() { |
| 7 | block_on(async { |
| 8 | let future = my_async_fn(); |
| 9 | tokio::pin!(future); |
| 10 | (&mut future).await |
| 11 | }); |
| 12 | } |
| 13 |