diff --git a/src/ch17-04-streams.md b/src/ch17-04-streams.md index 657a5b251f..2eae1d9db5 100644 --- a/src/ch17-04-streams.md +++ b/src/ch17-04-streams.md @@ -82,13 +82,14 @@ so far, you might reasonably expect that trait to be `Stream`, but it’s actual `StreamExt`. Short for _extension_, `Ext` is a common pattern in the Rust community for extending one trait with another. -We’ll explain the Stream and StreamExt traits in a bit more detail at the end of -the chapter, but for now all you need to know is that the `Stream` trait defines -a low-level interface that effectively combines the `Iterator` and `Future` -traits. `StreamExt` supplies a higher-level set of APIs on top of `Stream`, -including the `next` method as well as other utility methods similar to those -provided by the `Iterator` trait. `Stream` and `StreamExt` are not yet part of -Rust’s standard library, but most ecosystem crates use the same definition. +We’ll explain the `Stream` and `StreamExt` traits in a bit more detail at the +end of the chapter, but for now all you need to know is that the `Stream` trait +defines a low-level interface that effectively combines the `Iterator` and +`Future` traits. `StreamExt` supplies a higher-level set of APIs on top of +`Stream`, including the `next` method as well as other utility methods similar +to those provided by the `Iterator` trait. `Stream` and `StreamExt` are not yet +part of Rust’s standard library, but most ecosystem crates use the same +definition. The fix to the compiler error is to add a `use` statement for `trpl::StreamExt`, as in Listing 17-31. diff --git a/src/ch17-05-traits-for-async.md b/src/ch17-05-traits-for-async.md index 349c5f5bd7..8e6a61f21b 100644 --- a/src/ch17-05-traits-for-async.md +++ b/src/ch17-05-traits-for-async.md @@ -387,7 +387,7 @@ idea of how to fix your code! > see Chapters [2][under-the-hood] and [4][pinning] of [_Asynchronous > Programming in Rust_][async-book]. -### The Stream Trait +### The `Stream` Trait Now that you have a deeper grasp on the `Future`, `Pin`, and `Unpin` traits, we can turn our attention to the `Stream` trait. As you learned earlier in the