Skip to content

Commit

Permalink
fixed docs about future(awt)
Browse files Browse the repository at this point in the history
  • Loading branch information
la10736 committed Mar 22, 2023
1 parent 2f1ff25 commit 2fb380e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -10,7 +10,7 @@ both for `rstest` and `rstest_reuse` (see #187)
## [0.17.0] 2023/3/19
### Add

- Add `#[awt]` and `#[timeout(awt)]` to `.await` future input
- Add `#[awt]` and `#[future(awt)]` to `.await` future input

### Fixed

Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -181,9 +181,10 @@ async fn my_async_test(#[future] base: u32, #[case] expected: u32, #[future] #[c
```

As you noted you should `.await` all _future_ values and this some times can be really boring.
In this case you can use `#[timeout(awt)]` to _awaiting_ an input or annotating your function
In this case you can use `#[future(awt)]` to _awaiting_ an input or annotating your function
with `#[awt]` attributes to globally `.await` all your _future_ inputs. Previous code can be
simplified like follow:

```rust
use rstest::*;
# #[fixture]
Expand Down
2 changes: 1 addition & 1 deletion rstest_macros/src/lib.rs
Expand Up @@ -729,7 +729,7 @@ pub fn fixture(
/// ```
///
/// As you noted you should `.await` all _future_ values and this some times can be really boring.
/// In this case you can use `#[timeout(awt)]` to _awaiting_ an input or annotating your function
/// In this case you can use `#[future(awt)]` to _awaiting_ an input or annotating your function
/// with `#[awt]` attributes to globally `.await` all your _future_ inputs. Previous code can be
/// simplified like follow:
///
Expand Down

0 comments on commit 2fb380e

Please sign in to comment.