Skip to content

Mention std::iter::zip in Iterator::zip docs #92899

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

cameron1024
Copy link
Contributor

Closes #91960

I'm not sure about the wording. I think it's alright, but happy to change.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dtolnay (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 14, 2022
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I wouldn't be able to read this and come away with an understanding of why I would pick one or the other. Your example shows zip(a, b) but isn't that practically identically readable to most Iterator::zip use cases?

Would it be possible to call out one or two specific scenarios in which iter::zip can be a readability improvement, and tweak the example to showcase the difference better?

@cameron1024 cameron1024 deleted the zip-docs branch January 27, 2022 05:29
@cameron1024 cameron1024 restored the zip-docs branch January 27, 2022 05:30
@cameron1024 cameron1024 reopened this Jan 27, 2022
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 27, 2022
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay
Copy link
Member

dtolnay commented Jan 27, 2022

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 27, 2022

📌 Commit 857ea1e has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 27, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2022
…askrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#91641 (Define c_char using cfg_if rather than repeating 40-line cfg)
 - rust-lang#92899 (Mention std::iter::zip in Iterator::zip docs)
 - rust-lang#93193 (Add test for stable hash uniqueness of adjacent field values)
 - rust-lang#93325 (Introduce a limit to Levenshtein distance computation)
 - rust-lang#93339 (rustdoc: add test case for multiple traits and erased names)
 - rust-lang#93357 (Clarify the `usage-of-qualified-ty` error message.)
 - rust-lang#93363 (`#[rustc_pass_by_value]` cleanup)
 - rust-lang#93365 (More arena cleanups)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 54f3578 into rust-lang:master Jan 28, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 28, 2022
scottmcm added a commit that referenced this pull request Jan 28, 2022
Just happened to notice this in passing
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 28, 2022
…ywiser

Fix a typo from rust-lang#92899

Just happened to notice this in passing
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 28, 2022
…ywiser

Fix a typo from rust-lang#92899

Just happened to notice this in passing
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2022
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#92611 (Add links to the reference and rust by example for asm! docs and lints)
 - rust-lang#93158 (wasi: implement `sock_accept` and enable networking)
 - rust-lang#93239 (Add os::unix::net::SocketAddr::from_path)
 - rust-lang#93261 (Some unwinding related cg_ssa cleanups)
 - rust-lang#93295 (Avoid double panics when using `TempDir` in tests)
 - rust-lang#93353 (Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t>)
 - rust-lang#93356 (Edit docs introduction for `std::cmp::PartialOrd`)
 - rust-lang#93375 (fix typo `documenation`)
 - rust-lang#93399 (rustbuild: Fix compiletest warning when building outside of root.)
 - rust-lang#93404 (Fix a typo from rust-lang#92899)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mention iter::zip in the documentation for Iterator::zip
6 participants