Skip to content

Commit

Permalink
fix failing doc test and clear up docs
Browse files Browse the repository at this point in the history
# Objective

Alternative to bevyengine#6150

Dependabot's PR doesn't seem to break anything, but there are some deprecations that we might as well fix up.

## Solution

https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating

Update clap in `build-wasm-example` and `span-cmp`. Other tools don't use clap.

Remove references to `value_parser`. It's the default now.

Change `#[clap()]` to `#[arg()]`.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and hymm committed Oct 20, 2022
1 parent abbc0cf commit 0ddb0dd
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions crates/bevy_tasks/src/task_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,19 @@ impl TaskPool {
/// });
/// });
///
/// // results are returned in the order the tasks are spawned in.
/// // Note: the ordering may become non-deterministic if you spawn from within tasks.
/// // the ordering is only guaranteed when tasks are spawned directly from the main closure.
/// // The ordering of results is non-deterministic if you spawn from within tasks as above.
/// // This commented out assert will fail intermittently because the inner spawn can be inserted into
/// // the queue before the outer one.
/// // assert_eq!(&results[..], &[0, 1]);
///
/// // The ordering is deterministic if you only spawn directly from the closure function.
/// let results = pool.scope(|s| {
/// s.spawn(async { 0 });
/// s.spawn(async { 1 });
/// });
/// assert_eq!(&results[..], &[0, 1]);
/// // can access x after scope runs
///
/// // You can access x after scope runs, since it was only temporarily borrowed in the scope.
/// assert_eq!(x, 2);
/// ```
///
Expand Down

0 comments on commit 0ddb0dd

Please sign in to comment.