-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add FixedPointOperand
blanket implementation
#14634
Add FixedPointOperand
blanket implementation
#14634
Conversation
bot fmt |
@juangirini https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3257301 was started for your command Comment |
@juangirini Command |
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.
Explicitly stating the bound should not be needed.
Co-authored-by: Gavin Wood <[email protected]>
Balance
to FixedPointOperand
Balance
bound and FixedPointOperand
implementation
Balance
bound and FixedPointOperand
implementationBalance
bounds and FixedPointOperand
implementation
I haven't found that blanket impl so I added it as part of this PR. Also, |
frame/assets/src/lib.rs
Outdated
@@ -241,7 +243,8 @@ pub mod pallet { | |||
+ Copy | |||
+ MaybeSerializeDeserialize | |||
+ MaxEncodedLen | |||
+ TypeInfo; | |||
+ TypeInfo | |||
+ CheckedNeg; |
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.
Avoid adding here - just add it into BaseArithmetic
trait/blanket impl along with all the other Checked*
bounds. With that in place you should be able to remove all the other CheckedNeg
stuff in this PR and simplify a bit.
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.
Getting there. Left a comment.
Balance
bounds and FixedPointOperand
implementationBaseArithmetic
bounds and FixedPointOperand
implementation
BaseArithmetic
bounds and FixedPointOperand
implementationFixedPointOperand
blanket implementation
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.
LGTM.
bot merge |
This PR replaces the explicit
FixedPointOperand
impls by a blanket one so thatBalance
implements it.