-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
Apply rustfmt and fix Clippy warnings #1448
Conversation
@@ -50,6 +50,7 @@ | |||
#![doc(test(attr(allow(unused_variables), deny(warnings))))] | |||
#![no_std] | |||
#![cfg_attr(feature = "simd_support", feature(portable_simd))] | |||
#![allow(unexpected_cfgs)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed after renaming doc_cfg
to docsrs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably will leave fixing it for a later PR. We also should consider using doc_auto_cfg
(it has certain issues, but I am not sure they affect us).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave it to a later PR anyway?
@@ -387,6 +379,7 @@ pub trait Weight: Clone { | |||
/// - `Result::Err`: Returns an error when `Self` cannot represent the | |||
/// result of `self + v` (i.e. overflow). The value of `self` should be | |||
/// discarded. | |||
#[allow(clippy::result_unit_err)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we introduce a separate error type as suggested by this lint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to a new PR please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean leave the allow
for now and introduce new error type in a later PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Given how much needs reformatting, it should be in a dedicated PR (not mixed up with Clippy / other fixes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing so will be REALLY annoying to untangle and I would strongly prefer to do both formatting and fixing of Clippy lints in one PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attr still shouldn't be here. Let Clippy complain in the CI if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would fail the CI job. Are you ready to merge a PR with a failing CI job? What is the reason to leave it for a later PR? If it's just to make 2 "clear" commits in the git history instead of just one, I don't think it's worth the associated trouble.
I suggest to also remove |
It certainly needs reviewing — removing is acceptable. |
@@ -387,6 +379,7 @@ pub trait Weight: Clone { | |||
/// - `Result::Err`: Returns an error when `Self` cannot represent the | |||
/// result of `self + v` (i.e. overflow). The value of `self` should be | |||
/// discarded. | |||
#[allow(clippy::result_unit_err)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to a new PR please
@@ -50,6 +50,7 @@ | |||
#![doc(test(attr(allow(unused_variables), deny(warnings))))] | |||
#![no_std] | |||
#![cfg_attr(feature = "simd_support", feature(portable_simd))] | |||
#![allow(unexpected_cfgs)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave it to a later PR anyway?
Closes #1429