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

Add new lint for Result<T, E>.map_or(None, Some(T)) #5415

Merged
merged 9 commits into from
Apr 8, 2020

Commits on Apr 4, 2020

  1. result_map_or_into_option: add lint to catch manually adpating Result…

    … -> Option
    
    Result<T, E> has an `ok()` method that adapts a Result<T,E> into an Option<T>.
    It's possible to get around this adapter by writing Result<T,E>.map_or(None, Some).
    
    This lint is implemented as a new variant of the existing
    [`option_map_none` lint](rust-lang#2128)
    nickrtorres committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    91d8a80 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91759a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3a29aed View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d0738bd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fb276dc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    acc3bc1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2533f56 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    325d0b6 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2020

  1. Configuration menu
    Copy the full SHA
    5d54fbb View commit details
    Browse the repository at this point in the history