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 warning and enforce no warning in the CI #273

Merged
merged 6 commits into from
Apr 29, 2021

Conversation

chevdor
Copy link
Contributor

@chevdor chevdor commented Apr 19, 2021

This PR fixes a (the single) clippy warning and enforces in the CI that warnings are unwanted.

This PR is small/short but should not be merged lightly as it would require a major version bump.

It is also not critical to have immediately so it would be a good candidate to pack with other PRs that would change the public interface.

@dvdplm
Copy link
Contributor

dvdplm commented Apr 26, 2021

@chevdor I took the liberty to merge in master.

Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

LGTM modulo -D warnings in the CI

Copy link

@emostov emostov left a comment

Choose a reason for hiding this comment

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

not be merged lightly as it would require a major version bump.

dq: is this a breaking change because we now return an error in a logic branch that previously would have not error'ed? Since the return type doesn't change on try_merge could it be considered just a patch?

@niklasad1
Copy link
Member

dq: is this a breaking change because we now return an error in a logic branch that previously would have not error'ed? Since the return type doesn't change on try_merge could it be considered just a patch?

I would regard it as patch/bug fix but for now we don't care about about breaking changes because we are still at pre release version

@chevdor
Copy link
Contributor Author

chevdor commented Apr 29, 2021

@emostov in theory yes, with the last change I made, a fn has been changed.
It was returning a Result and so potentially an Err in theory but nothing in the code was ever returning an Err. Now, in some conditions, it may.

But if you treated already the Result properly before (= assuming it could be an Err), you should not have a suprise.

Copy link

@emostov emostov left a comment

Choose a reason for hiding this comment

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

Thanks @chevdor & @niklasad1 for the quick answer. From my PoV this looks good

@dvdplm
Copy link
Contributor

dvdplm commented Apr 29, 2021

@chevdor feel free to merge when CI clears, and ty! :)

@niklasad1 niklasad1 merged commit ac115fb into paritytech:master Apr 29, 2021
@chevdor chevdor deleted the wk-clippy-fix branch April 30, 2021 07:19
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.

5 participants