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 clippy warnings #981

Merged
merged 4 commits into from
Jul 27, 2020
Merged

Conversation

TaKO8Ki
Copy link
Contributor

@TaKO8Ki TaKO8Ki commented Jul 25, 2020

fix some clippy warnings. There is still a warning like the following that I find it difficult to solve.

warning: returning the result of a `let` binding from a block
   --> src/proxy.rs:693:5
    |
683 |     let proxies = get_from_environment();
    |     ------------------------------------- unnecessary `let` binding
...
693 |     proxies
    |     ^^^^^^^
    |
    = note: `#[warn(clippy::let_and_return)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
    |
683 |     
684 | 
685 |     // TODO: move the following #[cfg] to `if expression` when attributes on `if` expressions allowed
686 |     #[cfg(target_os = "windows")]
687 |     {
688 |         if proxies.is_empty() {
  ...

warning: 1 warning emitted

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@seanmonstar seanmonstar merged commit 1e6957a into seanmonstar:master Jul 27, 2020
@TaKO8Ki TaKO8Ki deleted the fix-clippy-warning branch July 27, 2020 16:06
Nutomic pushed a commit to Nutomic/reqwest that referenced this pull request Nov 7, 2024
* refactor: fix clippy warnings

* refactor: fix redundant_closure

* refactor: fix collapsible if

* refactor: remove unnecessary_unwrap
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.

2 participants