Skip to content

Reducing even eliminating all clippy warning  #3802

Closed
@linyihai

Description

@linyihai

Is your feature request related to a problem? Please describe.

Running clippy cmd, current workspace generate serval warnings

cargo clippy --workspace --all-targets --no-deps -- -D warnings

output is

...

error: non-binding `let` on a future
   --> src/client/dispatch.rs:455:9
    |, 
455 |         let _ = tx.try_send(Custom(3)).unwrap();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider awaiting the future or dropping explicitly with `std::mem::drop`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future

error: could not compile `hyper` (lib test) due to 49 previous errors

Describe the solution you'd like

  • Some of the more obvious fixes and can be automatically adopted, can be repaired
  • Something that requires a little bit of thinking about how to improve, like defining types for complex expressions, like Poll<Option<crate::Result<(MessageHead<T::Incoming>, DecodedLength, Wants)>>>,
  • Add clippy CI workflow

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-refactorCategory: refactor. This would improve the clarity of internal code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions