Skip to content

Not possible to implement AtLeast32Bit for signed number #1144

Open
@xlc

Description

Since paritytech/substrate#6367 we have AtLeast32Bit and AtLeast32BitUnsigned so it is obvious that AtLeast32Bit should support signed integer like i128.

However it is currently not possible to use i128 for AtLeast32Bit.

AtLeast32Bit extends BaseArithmetic which extends HasCompact.

HasCompact can only be implemented for unsigned integer (unless someone extend it to make it support signed integer).

Should remove HasCompact from BaseArithmetic and add it to AtLeast32BitUnsigned instead.

Metadata

Assignees

No one assigned

    Labels

    C1-mentorA task where a mentor is available. Please indicate in the issue who the mentor could be.D1-mediumCan be fixed by a coder with good Rust knowledge but little knowledge of the codebase.I4-refactorCode needs refactoring.

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions