diff options
| author | Jeff <dev@jeffa.io> | 2022-03-04 09:48:51 -0500 |
|---|---|---|
| committer | Jeff <dev@jeffa.io> | 2022-03-04 09:48:51 -0500 |
| commit | b363f130698dbc55fe594155bcb4df826ffad71e (patch) | |
| tree | 66d0d130848276ed6509b405adcb582eb5440d74 | |
| parent | 5f34c04de66c9ec98dd4f6f6d88bb6c10d21b9fb (diff) | |
| download | rust-b363f130698dbc55fe594155bcb4df826ffad71e.tar.gz rust-b363f130698dbc55fe594155bcb4df826ffad71e.zip | |
Add suggested changes to the docs
| -rw-r--r-- | library/core/src/iter/traits/collect.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/iter/traits/collect.rs b/library/core/src/iter/traits/collect.rs index 28ae2277252..dee66e6e072 100644 --- a/library/core/src/iter/traits/collect.rs +++ b/library/core/src/iter/traits/collect.rs @@ -5,9 +5,9 @@ /// collection of some kind. /// /// If you want to create a collection from the contents of an iterator, the -/// [`Iterator::collect()`] method is preferred. However, the compiler is -/// sometimes unable to infer the full type of the collection. In these cases, -/// [`FromIterator::from_iter()`] can be more concise and readable. See the +/// [`Iterator::collect()`] method is preferred. However, when you need to +/// specify the container type, [`FromIterator::from_iter()`] can be more +/// readable than using a turbofish (e.g. `::<Vec<_>>()`). See the /// [`Iterator::collect()`] documentation for more examples of its use. /// /// See also: [`IntoIterator`]. |
