mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
This PR removes all of the `futures` dependencies. `std::future` does not contain a lot of useful helpers available in futures. The obvious ones are `join_all`, `FutureExt::map`, and `block_on`. * `join_all` is replaced with a `Vec<T>` and async blocks. * `FuturesExt::map` in the web backend is replaced by rolling the `map` function into the `MakeSendFuture` type. * `block_on` is provided by `pollster`. The original code using `join_all` ignored the result type yielded by the Future from `map_async`. This code does the same, but makes dropping the result a little more obvious. These should not be troublesome. Figured I would call them out anyway. The last big change is replacing `futures-executor` in the examples with `async-executor`. A new concrete `Spawner` type is used in the example framework instead of an implementation of `futures_task::LocalSpawn`.
