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 lints #1069

Merged
merged 7 commits into from
Nov 2, 2022
Merged

Fix clippy lints #1069

merged 7 commits into from
Nov 2, 2022

Conversation

olivereanderson
Copy link
Contributor

@olivereanderson olivereanderson commented Nov 1, 2022

Description of change

Fixes new warnings from clippy +nightly.

The error variant identity_iota_core::Error::DIDUpdateError wrapped a tuple consisting of a static string and an optional iota_client::Error. The size of the aforementioned tuple is then 16 + 120 = 136 bytes thus exceeding clippy's large_error_threshould which is 128 bytes by default (see clippy::result_large_err). I reduced the size of this variant by boxing the wrapped iota_client::Error which is why this is marked as a breaking change.

Links to any relevant issues

unblocks #1067.

Type of change

Add an x to the boxes that are relevant to your changes.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Runs under cargo test --all-features.

Change checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@olivereanderson olivereanderson marked this pull request as ready for review November 1, 2022 17:55
@olivereanderson olivereanderson changed the title WIP: Fix clippy lints Fix clippy lints Nov 1, 2022
@olivereanderson olivereanderson self-assigned this Nov 2, 2022
@olivereanderson olivereanderson added Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Nov 2, 2022
@olivereanderson olivereanderson added this to the v0.7 Features milestone Nov 2, 2022
@olivereanderson olivereanderson merged commit 29eaf57 into main Nov 2, 2022
@eike-hass eike-hass deleted the origin/fix-clippy-error-size branch November 30, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants