Skip to content

rust guide: take() confusingly described as returning a list #18218

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

Closed
giogadi opened this issue Oct 22, 2014 · 1 comment · Fixed by #18273
Closed

rust guide: take() confusingly described as returning a list #18218

giogadi opened this issue Oct 22, 2014 · 1 comment · Fixed by #18273

Comments

@giogadi
Copy link

giogadi commented Oct 22, 2014

In the iterator adapters section of the Rust Guide:

http://doc.rust-lang.org/0.12.0/guide.html#iterator-adapters

The following sentence is used to describe the take() function:

"take(n) will get the first n items out of an iterator, and return them as a list."

This is a bit confusing; most programmers would think of Rust's arrays when they hear the term "list", but this conflicts with the key point that should be made here, which is that take() takes an iterator and returns another iterator as a result.

@huonw huonw added the A-docs label Oct 22, 2014
@steveklabnik
Copy link
Member

Yup, this is clearly an oversight in the wording, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants