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

Fixing clippy warnings #90

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Conversation

Angel-Petrov
Copy link
Contributor

@Angel-Petrov Angel-Petrov commented Nov 16, 2023

This PR fixes clippy warnings which were most easily able to be fixed.

The primary chunk of warnings were due to a associated function Self::default() existing but also implementing Default. There should (hopefully) be no breaking changes from removing the associated function as user's code will fall back to Default::default.

Another clippy warning fix that is a potential breaking change is implementing Default on Transaction and Tx, though this is only a issue in contrived scenarios and the crate is still in 0.x.

A weird edge case was when encountering Config::default_main(), I decided to keep the associated function for stability reasons and I just made Default::default() call it.

As for the remaining clippy warnings, only 3 remain:

Copy link
Collaborator

@richardpringle richardpringle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow... I've done this before and it was not a fun exercise. Thank you!

@richardpringle
Copy link
Collaborator

@Angel-Petrov, just need to run cargo fmt to fix this (and pull in any updates)

@richardpringle richardpringle merged commit 557b7ba into ava-labs:main Nov 29, 2023
6 checks passed
@Angel-Petrov Angel-Petrov deleted the clippy-fixes branch November 30, 2023 08:08
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

Successfully merging this pull request may close these issues.

2 participants