Skip to content

Implement PartialEq<u64> for Height #1507

@varun-doshi

Description

@varun-doshi

Description

Height should have implementations for PartialEq and possibly for other uint types.
Although Height has a value() function which can be called to something like height.value() == 5 but it might not be very ergonomic if this is being implemented for a trait. It would be requiring a value function for the custom trait and all other types would need to implement it as well.
Since, Height and PartialEq are external entities to a project, it would not be possible to do this from another project.
For example, if a trait has the following three implementors: Height, u64, i64. It would not be possible to do height == 5 since Height and creating value functions for u64/i64 does not make sense

Definition of "done"

  • impl ParitalEq<u64> for Height is comepleted (and for other uint/int types if required)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions