Skip to content

DecimalValue checked_add should not upcast to i256 unconditionally #7022

@joseph-isaacs

Description

@joseph-isaacs

fn checked_binary_op<F>(&self, other: &Self, op: F) -> Option<Self>

Find the max size of left and right and use that.

This just hides an upcast which can lead to other large scalar for no reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions