Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix: allow clippy::redundant_clone and clippy::type_complexity in abigen #491

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

georgewhewell
Copy link
Contributor

Motivation

some files generated by abigen do not lint with clippy- e.g.

warning: redundant clone
   --> src/data_sources/bindings/frax_abi.rs:812:73
    |
812 |             if let Ok(decoded) = WithdrawnLockedFilter::from_token(token.clone()) {
    |                                                                         ^^^^^^^^ help: remove this
    |
note: this value is dropped without further use
warning: very complex type used. Consider factoring parts into `type` definitions
   --> src/data_sources/bindings/frax_abi.rs:174:14
    |
174 |           ) -> ethers::contract::builders::ContractCall<
    |  ______________^
175 | |             M,
176 | |             Vec<(
177 | |                 [u8; 32],
...   |
182 | |             )>,
183 | |         > {
    | |_________^
    |
    = note: `#[warn(clippy::type_complexity)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Solution

adds #![allow(clippy::redundant_clone)] and #![allow(clippy::type_complexity)] to abigen

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@gakonst
Copy link
Owner

gakonst commented Oct 8, 2021

LGTM - thank you, @mattsse are there maybe any improvements we can make to the codegen to have less lints skipped?

@gakonst gakonst merged commit 7d2e900 into gakonst:master Oct 8, 2021
@georgewhewell georgewhewell deleted the clippy-ignores branch October 8, 2021 14:24
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
* add publish

* improve

Co-authored-by: Bjerg <[email protected]>

Co-authored-by: Bjerg <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants