This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
library/core/src/iter/traits Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1543,11 +1543,10 @@ pub trait Iterator {
15431543 /// collection into another. You take a collection, call [`iter`] on it,
15441544 /// do a bunch of transformations, and then `collect()` at the end.
15451545 ///
1546- /// One of the keys to `collect()`'s power is that many things you might
1547- /// not think of as 'collections' actually are. For example, a [`String`]
1548- /// is a collection of [`char`]s. And a collection of
1549- /// [`Result<T, E>`][`Result`] can be thought of as single
1550- /// [`Result`]`<Collection<T>, E>`. See the examples below for more.
1546+ /// `collect()` can also create instances of types that are not typical
1547+ /// collections. For example, a [`String`] can be built from [`char`]s,
1548+ /// and an iterator of [`Result<T, E>`][`Result`] items can be collected
1549+ /// into `Result<Collection<T>, E>`. See the examples below for more.
15511550 ///
15521551 /// Because `collect()` is so general, it can cause problems with type
15531552 /// inference. As such, `collect()` is one of the few times you'll see
You can’t perform that action at this time.
0 commit comments