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

No mention of unwrap_or and unwrap_or_else in 18.3. Option & unwrap

Open
#1,835 0 comments 0 reactions 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

unwrap_or and unwrap_or_else are two of the most commonly needed ways of handling defaults for Option. And yet they aren't even mentioned in this section. I think it is important to give examples with them in section 18.3.4. "Unpacking options and defaults".

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

Open section 18.3.4, “Unpacking options and defaults,” and review how the surrounding Option and unwrap material presents examples. Add examples or mentions for unwrap_or and unwrap_or_else, then confirm both commonly used default-handling methods are covered in that section.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.