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 some clippy catches #309

Closed
5 tasks
Farhad-Shabani opened this issue Dec 20, 2022 · 0 comments · Fixed by #310
Closed
5 tasks

Fix some clippy catches #309

Farhad-Shabani opened this issue Dec 20, 2022 · 0 comments · Fixed by #310
Labels
O: code-hygiene Objective: aims to improve code hygiene

Comments

@Farhad-Shabani
Copy link
Member

Farhad-Shabani commented Dec 20, 2022

Summary of Bug

Reviewing the codes, came across lints that trigger cargo clippy while working with different Rust toolchains.
Also, some clippy exceptions could be swept to achieve a consistent practice as mentioned here

To Do

  • Use variables directly in the format! & write! strings
  • Change the type trusted_validator_set field of MisbehaviourTrustedValidatorHashMismatch to avoid large_enum_variant
  • Box MockHeader and SyntheticTmBlock types of mock/host.rs
  • Remove unnecessary clippy::large_enum_variant, clippy::ptr_arg, and clippy::wrong_self_convention
  • Drop #[allow(clippy::too_many_arguments)]
    Note: This requires a rework of the functions with an excessive number of arguments. It can be handled in a separate issue.

Version

rustc 1.66.0 (69f9c33d7 2022-12-12)
clippy 0.1.66
clippy 0.1.67

Toolchains:

  • stable-aarch64-apple-darwin
  • nightly-aarch64-apple-darwin

Steps to Reproduce

rustup default nightly
cargo clippy

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@Farhad-Shabani Farhad-Shabani mentioned this issue Dec 20, 2022
7 tasks
@Farhad-Shabani Farhad-Shabani added the O: code-hygiene Objective: aims to improve code hygiene label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: code-hygiene Objective: aims to improve code hygiene
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant