last review
This commit is contained in:
@@ -378,7 +378,7 @@ While the example above compiles just fine, we expose consumers of this this API
|
||||
to both possible undefined behavior and other memory errors while using just safe
|
||||
Rust. This is a big problem!
|
||||
|
||||
But now, let's prevent the segfault from happening using `Pin`. We'll discuss
|
||||
But now, let's prevent this problem using `Pin`. We'll discuss
|
||||
`Pin` more in the next chapter, but you'll get an introduction here by just
|
||||
reading the comments.
|
||||
|
||||
@@ -503,8 +503,8 @@ the value afterwards it will violate the guarantee they promise to uphold when
|
||||
they did their unsafe implementation.
|
||||
|
||||
Hopefully, after this you'll have an idea of what happens when you use the
|
||||
`yield` or `await` keyword (inside an async function) why we need `Pin` if we
|
||||
want to be able to borrow across `yield/await` points.
|
||||
`yield` or `await` keywords inside an async function, and why we need `Pin` if
|
||||
we want to be able to safely borrow across `yield/await` points.
|
||||
|
||||
[rfc2033]: https://github.com/rust-lang/rfcs/blob/master/text/2033-experimental-coroutines.md
|
||||
[greenthreads]: https://cfsamson.gitbook.io/green-threads-explained-in-200-lines-of-rust/
|
||||
|
||||
Reference in New Issue
Block a user