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

Conversation

jqnatividad
Copy link
Contributor

applied select clippy lint recommendations

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
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
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
@matklad
Copy link
Owner

matklad commented May 23, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented May 23, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

  • Rust

@bors bors bot merged commit 652015f into matklad:master May 23, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants