-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FromIterator
probably shouldn't say "rarely called explicitly" when it's in the prelude
#90107
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Comments
scottmcm
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
labels
Oct 20, 2021
Can I take care of this? |
@henrifrancois Absolutely! You can use |
@rustbot claim |
Hi @henrifrancois! I'd like to claim this issue if you're interested in releasing it. |
@rustbot unclaim. All yours @JKAnderson409 |
Thanks! @rustbot claim |
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Mar 10, 2022
…ottmcm Document new recommended use of `FromIterator::from_iter` rust-lang#90107 Most of the added prose was paraphrased from the links provided in the issue. The suggested `VecDeque` example seemed to make the point well enough so I just used that.
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Mar 10, 2022
…ottmcm Document new recommended use of `FromIterator::from_iter` rust-lang#90107 Most of the added prose was paraphrased from the links provided in the issue. The suggested `VecDeque` example seemed to make the point well enough so I just used that.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Mar 10, 2022
…ottmcm Document new recommended use of `FromIterator::from_iter` rust-lang#90107 Most of the added prose was paraphrased from the links provided in the issue. The suggested `VecDeque` example seemed to make the point well enough so I just used that.
Closed by #94587 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
The documentation for
FromIterator
https://doc.rust-lang.org/nightly/std/iter/trait.FromIterator.html saysHowever, the trait is now in the rust_2021 prelude https://doc.rust-lang.org/nightly/core/prelude/rust_2021/index.html explicitly to allow it to be called more often.
This documentation should thus likely be updated to -- while still pointing at
collect
-- mention why one may wish to call it explicitly. Perhaps something likeVecDeque::from_iter(0..100)
would be a nice example.One might also re-use some text from the RFC that added it to the prelude, https://rust-lang.github.io/rfcs/3114-prelude-2021.html#fromiterator
The text was updated successfully, but these errors were encountered: