Skip to content
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

Remove erroneous statement in repeat_n documentation that was obsoleted by the same version repeat_n was stabilized #131862

Conversation

schuelermine
Copy link
Contributor

Remove statement that std::iter::repeat_n(element, count) is different from std::iter::repeat(element).take(count) because its return type implements std::iter::ExactSizeIterator.

This would’ve been true if 994e712 and 3dca909 didn't add impl<T: Clone> std::iter::ExactSizeIterator for std::iter::Take<std::iter::Repeat<T>> (library/core/src/iter/adapters/take.rs:364).

remove statement that std::iter::repeat_n(element, count) is different from std::iter::repeat(element).take(count) because its return type implements std::iter::ExactSizeIterator

this would’ve been true if 994e712 and 3dca909 didn't add impl<T: Clone> std::iter::ExactSizeIterator for std::iter::Take<std::iter::Repeat<T>>
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2024

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 17, 2024
@schuelermine
Copy link
Contributor Author

schuelermine commented Oct 17, 2024

Duplicate of #131858.

(wow, literally an exact duplicate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants