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

Make clippy happy #228

Merged
merged 3 commits into from May 23, 2023
Merged

Make clippy happy #228

merged 3 commits into from May 23, 2023

Commits on May 23, 2023

  1. clippy::mem_replace_with_default

    warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
       --> src/lib.rs:641:13
        |
    641 |             mem::replace(self, Self::default()).into_inner()
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(self)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
        = note: `#[warn(clippy::mem_replace_with_default)]` on by default
    
    warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
        --> src/lib.rs:1166:13
         |
    1166 |             mem::replace(self, Self::default()).into_inner()
         |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(self)`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
    jqnatividad committed May 23, 2023
    Configuration menu
    Copy the full SHA
    885ab76 View commit details
    Browse the repository at this point in the history
  2. clippy::needless_borrow

    warning: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/imp_std.rs:212:22
        |
    212 |                 wait(&queue, curr_queue);
        |                      ^^^^^^ help: change this to: `queue`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
        = note: `#[warn(clippy::needless_borrow)]` on by default
    jqnatividad committed May 23, 2023
    Configuration menu
    Copy the full SHA
    307ff0c View commit details
    Browse the repository at this point in the history
  3. clippy::redundant_pattern_matching

    warning: redundant pattern matching, consider using `is_err()`
       --> src/race.rs:354:20
        |
    354 |             if let Err(_) = exchange {
        |             -------^^^^^^----------- help: try this: `if exchange.is_err()`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
        = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
    jqnatividad committed May 23, 2023
    Configuration menu
    Copy the full SHA
    39933cd View commit details
    Browse the repository at this point in the history