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

Fix some clippy lints for library/std/src/sys/windows #118154

Merged
merged 17 commits into from
Nov 23, 2023

Commits on Nov 22, 2023

  1. allow clippy style in windows/c.rs

    We intentional use the Windows API style here.
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    ad12be3 View commit details
    Browse the repository at this point in the history
  2. needless_return

    unneeded `return` statement
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    533de2b View commit details
    Browse the repository at this point in the history
  3. useless_conversion

    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    6c22e57 View commit details
    Browse the repository at this point in the history
  4. unnecessary_mut_passed

    This is where our Windows API bindings previously (and incorrectly) used `*mut` instead of `*const` pointers. Now that the bindings have been corrected, the mutable references (which auto-convert to `*mut`) are unnecessary and we can use shared references.
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    bfbeb3e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fe25569 View commit details
    Browse the repository at this point in the history
  6. needless_borrows_for_generic_args

    the borrowed expression implements the required traits
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    4273459 View commit details
    Browse the repository at this point in the history
  7. needless_borrow

    this expression creates a reference which is immediately dereferenced by the compiler
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    2454263 View commit details
    Browse the repository at this point in the history
  8. unnecessary_cast

    casting to the same type is unnecessary
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    9e42456 View commit details
    Browse the repository at this point in the history
  9. duration_subsec

    calling `subsec_micros()` is more concise than this calculation
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    b962ae1 View commit details
    Browse the repository at this point in the history
  10. redundant_closure

    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    220217a View commit details
    Browse the repository at this point in the history
  11. unnecessary_lazy_evaluations

    unnecessary closure used with `bool::then`
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    8c85c5b View commit details
    Browse the repository at this point in the history
  12. manual_map

    manual implementation of `Option::map`
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    4c084c5 View commit details
    Browse the repository at this point in the history
  13. op_ref

    taken reference of right operand
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    d7e1f1c View commit details
    Browse the repository at this point in the history
  14. manual_range_contains

    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    c15adf6 View commit details
    Browse the repository at this point in the history
  15. cmp_null

    comparing with null is better expressed by the `.is_null()` method
    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    852c038 View commit details
    Browse the repository at this point in the history
  16. redundant_slicing

    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    6c8ebf1 View commit details
    Browse the repository at this point in the history
  17. x fmt library/std

    ChrisDenton committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    b9fe367 View commit details
    Browse the repository at this point in the history