Repository navigation
API Docs: option #29366
Description
Activity
In the
as_mutanditer_mutexamples, a match is used with aNone => {}arm.if letwould be more idiomatic.In the documentation for
unwrap_or(and maybe for related methods likeok_orandor), it would be nice to make a note that the arguments to a function are always fully evaluated, meaning thatfn foo(opt: Option<Bar>) -> Bar { let bar = opt.unwrap_or(return Bar::new()); bar.baz() }will always return
Bar::new()instead ofopt.unwrap().baz(), even if opt isSome(_). This seems like a pitfall otherwise.- addedE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on Mar 8, 2017 I am happy to mentor anyone who wants to tackle this issue.
- addedA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools
on Mar 10, 2017 - addedE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.P-mediumMedium priorityMedium priorityand removed
on Mar 24, 2017 @steveklabnik I'd like to help on this.
@irfanhudda awesome! Let me know if I can help you help us in any way :)
@steveklabnik Module level docs look fine here. I think the documentation of
IntoIter,IterandIterMutstructs can be improved. Do we also need examples or anything else?Oh, I just noticed I didn't add a checklist for this issue!
They do not need examples, but they should follow the standard iterator boilerplate: https://doc.rust-lang.org/stable/std/iter/struct.SkipWhile.html
An iterator that rejects elements while predicate is true.
This struct is created by the skip_while() method on Iterator. See its documentation for more.
Reacted by Irfan Hudda- added 9 commits that reference this issue
on Apr 3, 2017 I think this issue can be closed (as of #40999); the docs look pretty good now!
:D
Part of #29329
http://doc.rust-lang.org/std/option/