Skip to content

API Docs: option #29366

Description

@steveklabnik

Activity

  1. leoyvens commented on Oct 28, 2015

    @leoyvens
    Contributor

    In the as_mut and iter_mut examples, a match is used with a None => {} arm. if let would be more idiomatic.

  2. devonhollowood commented on Dec 9, 2015

    @devonhollowood
    Contributor

    In the documentation for unwrap_or (and maybe for related methods like ok_or and or), it would be nice to make a note that the arguments to a function are always fully evaluated, meaning that

    fn foo(opt: Option<Bar>) -> Bar {
        let bar = opt.unwrap_or(return Bar::new());
        bar.baz()
    }
    

    will always return Bar::new() instead of opt.unwrap().baz(), even if opt is Some(_). This seems like a pitfall otherwise.

  3. added a commit that references this issue on Mar 24, 2016
  4. added
    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
    on Mar 8, 2017
  5. steveklabnik commented on Mar 8, 2017

    @steveklabnik
    ContributorAuthor

    I am happy to mentor anyone who wants to tackle this issue.

  6. added
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Mar 10, 2017
  7. added
    E-help-wantedCall for participation: Help is requested to fix this issue.
    E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.
    and removed on Mar 24, 2017
  8. irfanhudda commented on Mar 31, 2017

    @irfanhudda
    Contributor

    @steveklabnik I'd like to help on this.

  9. steveklabnik commented on Mar 31, 2017

    @steveklabnik
    ContributorAuthor

    @irfanhudda awesome! Let me know if I can help you help us in any way :)

  10. irfanhudda commented on Mar 31, 2017

    @irfanhudda
    Contributor

    @steveklabnik Module level docs look fine here. I think the documentation of IntoIter, Iter and IterMut structs can be improved. Do we also need examples or anything else?

  11. steveklabnik commented on Mar 31, 2017

    @steveklabnik
    ContributorAuthor

    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.

  12. added 9 commits that reference this issue on Apr 3, 2017
  13. chordowl commented on Apr 15, 2017

    @chordowl
    Contributor

    I think this issue can be closed (as of #40999); the docs look pretty good now!

  14. steveklabnik commented on Apr 16, 2017

    @steveklabnik
    ContributorAuthor

    :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions