Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create method overview docs for core::option and core::result #86211

Merged
merged 12 commits into from
Jul 14, 2021

Commits on Jun 11, 2021

  1. fix wording in option doc

    Fix some awkward wording in the `core::option` documentation in the
    "Options and pointers" section.
    tlyu committed Jun 11, 2021
    Configuration menu
    Copy the full SHA
    cb65b48 View commit details
    Browse the repository at this point in the history
  2. fix typo in option doc

    Fix a typo/missed replacement in the documentation for
    `impl From<&Option<T>> for Option<&T>` in `core::option`.
    tlyu committed Jun 11, 2021
    Configuration menu
    Copy the full SHA
    4763377 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d54d59b View commit details
    Browse the repository at this point in the history
  4. updates based on reviews

    Fix an error in `map_or_else`. Use more descriptive text for
    "don't care" in truth tables. Make minor corrections to truth tables.
    Rename `makeiter` to `make_iter` in examples.
    tlyu committed Jun 11, 2021
    Configuration menu
    Copy the full SHA
    7edc666 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    370f731 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7265bef View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2021

  1. updates based on feedback

    Make minor wording changes in a few places. Move `filter` to the
    "transformations" section. Add `zip` methods to the "transformations"
    section. Clarify the section about `Option` iterators, and add a section
    about collecting into `Option`.
    
    Clarify that for `Result`, `or` and `or_else` can also produce a
    `Result` having a different type.
    tlyu committed Jun 12, 2021
    Configuration menu
    Copy the full SHA
    834f4b7 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2021

  1. add boolean operator example

    tlyu committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    1b58d93 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2021

  1. add more to result overview

    tlyu committed Jun 20, 2021
    Configuration menu
    Copy the full SHA
    9a00fd0 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2021

  1. Some<T> is not a type, etc

    tlyu committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    771f35c View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2021

  1. option/result overviews: address feedback

    (Most of these are from a review by joshtriplett. Thanks!)
    
    Fix errors in `as_pin_ref` and `as_pin_mut` in the "Adapters for
    working with references" overview.
    
    Reword some headings about transformation methods.
    
    Reclassify `map`, `map_or`, `map_or_else`, `map_err`, etc. to more
    accurately reflect which variants they transform.
    
    Document `Debug` requirement for `get_or_insert_default`.
    
    Reword text about `take` and `replace` to be more accurate.
    
    Add examples for the `Product` and `Sum` traits.
    
    Also:
    
    Move link reference definitions closer to their uses. Warn about making
    link reference definintions for `err` and `ok`. Avoid making other link
    reference definitions that might conflict in the future (foreign methods
    that share a name with local ones, etc.)
    
    Write out the generics of `Option` and `Result` when the following
    text refers to the type parameters.
    tlyu committed Jun 24, 2021
    Configuration menu
    Copy the full SHA
    c196cc9 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2021

  1. fix missing word

    tlyu committed Jul 2, 2021
    Configuration menu
    Copy the full SHA
    2b4a6aa View commit details
    Browse the repository at this point in the history