Skip to content

Commit 84e0f89

Browse files
authored
async fns desugared version is async move
1 parent d6b5c97 commit 84e0f89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/3185-static-async-fn-in-trait.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Note that if a function in a trait is written as an `async fn`, it must also be
4949
```rust
5050
impl Service for MyService {
5151
fn request(&self, key: i32) -> impl Future<Output = Response> {
52-
async {
52+
async move {
5353
...
5454
}
5555
}
@@ -71,7 +71,7 @@ impl Service for MyService {
7171
where
7272
Self: 'a;
7373
fn request<'a>(&'a self, key: i32) -> RequestFut<'a> {
74-
async { ... }
74+
async move { ... }
7575
}
7676
}
7777
```

0 commit comments

Comments
 (0)