-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fail clippy on warnings, try remove TODO comments #547
Conversation
@@ -140,6 +140,7 @@ impl<Api> EthCompatRuntimeApiCollection for Api where | |||
{ | |||
} | |||
|
|||
#[allow(clippy::too_many_arguments)] |
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 be tackled later if someone wants. didn't want to touch critical node code
@@ -154,7 +154,7 @@ impl<T: Config> Pallet<T> { | |||
error: <Error<T>>::DelegatorBondBelowMin.into(), | |||
}, | |||
); | |||
let new_amount: BalanceOf<T> = (bonded_amount - decrease_amount).into(); | |||
let new_amount: BalanceOf<T> = bonded_amount.saturating_sub(decrease_amount); |
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 is kinda big deal, I am wondering if there are more instances of using unsafe arithmetic in the staking code
@@ -409,8 +408,9 @@ fn geneses() { | |||
}); | |||
} | |||
|
|||
#[allow(unused_imports)] |
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 is very weird compiler error, maybe because block_author
is used only in tests it always complains that it is unused
that's cool |
not all the
TODO
comments are addressed.TODO
comments seem bit complex and more time consumingprecompiles
should be fixed with nextpolkadot-sdk
/frontier
upgrade to>1.3.0
check_on_save
we runclippy_on_save
. Sinceclippy
also runscheck
underneath