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

clippy: Revisit allowed clippy rules #85

Open
Tracked by #140
lexnv opened this issue Apr 24, 2024 · 2 comments
Open
Tracked by #140

clippy: Revisit allowed clippy rules #85

lexnv opened this issue Apr 24, 2024 · 2 comments

Comments

@lexnv
Copy link
Collaborator

lexnv commented Apr 24, 2024

Revisit the allowed clippy rules introduced by: #83.

A few notes on them:

  • single_match: Most of the code uses match { Variant::A => ..., _ => ... }
  • result_large_err: We could reduce this to propagate the expected peer, this info is not used currently in substrate

PeerIdMismatch(PeerId, PeerId),

  • type_complexity: We have a few complex types to reason about futures
@dmitry-markin
Copy link
Collaborator

PeerIdMismatch(PeerId, PeerId) this one is used by https://github.com/dmitry-markin/p2p-probe to detect the correct PeerId.

@dmitry-markin
Copy link
Collaborator

Currently ignored clippy lints for context:

litep2p/src/lib.rs

Lines 21 to 29 in 5c37774

#![allow(clippy::single_match)]
#![allow(clippy::result_large_err)]
#![allow(clippy::redundant_pattern_matching)]
#![allow(clippy::type_complexity)]
#![allow(clippy::result_unit_err)]
#![allow(clippy::should_implement_trait)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::assign_op_pattern)]
#![allow(clippy::match_like_matches_macro)]

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

No branches or pull requests

2 participants