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 a case to lint_search_is_some to handle searching strings #6119

Merged
merged 9 commits into from
Nov 16, 2020

Commits on Nov 11, 2020

  1. Added a lint as suggested in 6010 which recommends using contains()

    instead of `find()` follows by `is_some()` on strings
    
    Update clippy_lints/src/find_is_some_on_strs.rs
    Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
    
    Update clippy_lints/src/methods/mod.rs
    Co-authored-by: Philipp Krones <hello@philkrones.com>
    rsulli55 committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    a1cf2d3 View commit details
    Browse the repository at this point in the history
  2. Moved the tests for lint search_is_some to new files

    `search_is_some.rs` and `search_is_some_fixable.rs`
    rsulli55 committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    431fcbc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    55dc822 View commit details
    Browse the repository at this point in the history
  4. Remove to_string on msg

    Co-authored-by: Philipp Krones <hello@philkrones.com>
    rsulli55 and flip1995 committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    e9612f3 View commit details
    Browse the repository at this point in the history
  5. Remove borrow

    Co-authored-by: Philipp Krones <hello@philkrones.com>
    rsulli55 and flip1995 committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    fb74b48 View commit details
    Browse the repository at this point in the history
  6. Added period back to lint search_is_some and ran

    `update-all-references.sh`
    rsulli55 committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    ee1b959 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fd30313 View commit details
    Browse the repository at this point in the history
  8. Update clippy_lints/src/methods/mod.rs

    Co-authored-by: Philipp Krones <hello@philkrones.com>
    rsulli55 and flip1995 committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    56d252c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5c1c50e View commit details
    Browse the repository at this point in the history