Extra methods for `Option`
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
I noticed that a few potentially useful methods convertingOption to Result aren't currently implemented: ok_or_default, err_or, err_or_else, and err_or_default.
ok_or_default could be useful as a complement to unwrap_or_default when converting Options to Results with a certain error type.
All of the err_or functions are complements to ok_or and aren't implemented at all.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are mentioned. Start by reviewing the existing Option-to-Result methods and the conventions for unwrap_or_default and ok_or, then determine whether the four proposed complementary methods have clear semantics and sufficient motivation for an RFC decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100