Re-export futures_lite in bevy_tasks (#10670)

# Objective

- Fixes #10664

## Solution

- `pub use futures_lite as future` :)

---

## Changelog

- Made `futures_lite` available as `future` in the `bevy_tasks` module.

## Migration Guide

- Remove `futures_lite` from `Cargo.toml`.

```diff
[dependencies]
bevy = "0.12.0"
- futures-lite = "1.4.0"
```

- Replace `futures_lite` imports with `bevy::tasks::future`.

```diff
- use futures_lite::poll_once;
+ use bevy::tasks::future::poll_once;
```
This commit is contained in:
BD103 2023-11-21 11:51:13 -05:00 committed by GitHub
parent e67cfdf82b
commit 3578eec351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -35,6 +35,8 @@ pub use futures_lite::future::block_on;
mod iter;
pub use iter::ParallelIterator;
pub use futures_lite;
#[allow(missing_docs)]
pub mod prelude {
#[doc(hidden)]

View file

@ -3,9 +3,8 @@
use bevy::{
prelude::*,
tasks::{block_on, AsyncComputeTaskPool, Task},
tasks::{block_on, futures_lite::future, AsyncComputeTaskPool, Task},
};
use futures_lite::future;
use rand::Rng;
use std::time::{Duration, Instant};