mirror of https://github.com/rust-lang/async-book
Fix typo
This commit is contained in:
parent
da0c6cad49
commit
b10d07184b
|
@ -16,7 +16,7 @@ use std::rc::Rc;
|
|||
struct NotSend(Rc<()>);
|
||||
```
|
||||
|
||||
Variables of type `NotSend` can breifly appear as temporaries in `async fn`s
|
||||
Variables of type `NotSend` can briefly appear as temporaries in `async fn`s
|
||||
even when the resulting `Future` type returned by the `async fn` must be `Send`:
|
||||
|
||||
```rust
|
||||
|
@ -74,7 +74,7 @@ a different thread. Since `Rc` is not `Send`, allowing it to travel across
|
|||
threads would be unsound. One simple solution to this would be to `drop`
|
||||
the `Rc` before the `.await`, but unfortunately that does not work today.
|
||||
|
||||
In order to successfuly work around this issue, you may have to introduce
|
||||
In order to successfully work around this issue, you may have to introduce
|
||||
a block scope encapsulating any non-`Send` variables. This makes it easier
|
||||
for the compiler to tell that these variables do not live across an
|
||||
`.await` point.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
- [`?` in `async` Blocks](07_workarounds/03_err_in_async_blocks.md)
|
||||
- [`Send` Approximation](07_workarounds/04_send_approximation.md)
|
||||
- [Recursion](07_workarounds/05_recursion.md)
|
||||
- [`async` in Traits](07_workarounds/06_async_traits.md)
|
||||
- [`async` in Traits](07_workarounds/06_async_in_traits.md)
|
||||
- [TODO: I/O](404.md)
|
||||
- [TODO: `AsyncRead` and `AsyncWrite`](404.md)
|
||||
- [TODO: Asynchronous Design Patterns: Solutions and Suggestions](404.md)
|
||||
|
|
Loading…
Reference in New Issue