rust-lang / rust-lang/rust-by-example

More practical example of `while let` with iterators

Open
#1,821 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Handlebars
Stars
8.1k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

https://doc.rust-lang.org/rust-by-example/flow_control/while_let.html

Iterators have already been introduced, why not use an example of while let that users might actually need to use?

while let Some(value) = iter.next() {}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the while let page at https://doc.rust-lang.org/rust-by-example/flow_control/while_let.html and review its current example alongside the iterator context already introduced. Update the example to show a practical iterator use with while let, then verify that the documentation example is valid Rust.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.