Skip to content

style: Use iter for IntoIterator parameter names #32438

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

Merged
merged 1 commit into from
Mar 29, 2016

Conversation

kamalmarhubi
Copy link
Contributor

This commit standardizes the codebase on iter for parameters with
IntoIterator bounds.

Previously about 40% of IntoIterator parameters were named iterable,
with most of the rest being named iter. There was a single place where
it was named iterator.

@kamalmarhubi
Copy link
Contributor Author

r? @steveklabnik

@rust-highfive rust-highfive assigned steveklabnik and unassigned brson Mar 23, 2016
@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member

I would have assumed iter was used even more, maybe we should use that?

@kamalmarhubi
Copy link
Contributor Author

Good point. Furthre investigation:

rust$ ag -s 'IntoIterator.*iter:' --rust | wc -l
30
rust$ ag -s 'IntoIterator.*iterable:' --rust | wc -l
17

Should I standardize all uses on iter instead?

@steveklabnik
Copy link
Member

Let's do it 👍

Thanks for double checking.

This commit standardizes the codebase on `iter` for parameters with
IntoIterator bounds.

Previously about 40% of IntoIterator parameters were named `iterable`,
with most of the rest being named `iter`. There was a single place where
it was named `iterator`.
@kamalmarhubi kamalmarhubi changed the title docs: Use 'iterable' for IntoIterator parameter name in example style: Use iter for IntoIterator parameter names Mar 28, 2016
@kamalmarhubi kamalmarhubi force-pushed the intoiterator-example branch from fd46ae7 to 93569ac Compare March 28, 2016 18:03
@kamalmarhubi
Copy link
Contributor Author

@steveklabnik ping!

(was a way for a few days)

@steveklabnik
Copy link
Member

@bors: r+ rollup

No worries, I was too :)

@bors
Copy link
Collaborator

bors commented Mar 28, 2016

📌 Commit 93569ac has been approved by steveklabnik

@bors
Copy link
Collaborator

bors commented Mar 29, 2016

⌛ Testing commit 93569ac with merge 21a4d80...

bors added a commit that referenced this pull request Mar 29, 2016
style: Use `iter` for IntoIterator parameter names

This commit standardizes the codebase on `iter` for parameters with
IntoIterator bounds.

Previously about 40% of IntoIterator parameters were named `iterable`,
with most of the rest being named `iter`. There was a single place where
it was named `iterator`.
@bors bors merged commit 93569ac into rust-lang:master Mar 29, 2016
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 this pull request may close these issues.

5 participants