Skip to content

cmp: Replace with self == other and deprecate once PartialEq is const. #466

@github-actions

Description

@github-actions

On 2025-05-22 @prestwich wrote in 2b93402 “Merge pull request #441 from DaniPopes/const-bits”:

Replace with self == other and deprecate once PartialEq is const.

    /// Note that this currently might perform worse than the derived
    /// `PartialEq` (`==` operator).
    #[inline]
    #[must_use]
    pub const fn const_eq(&self, other: &Self) -> bool {
        // TODO: Replace with `self == other` and deprecate once `PartialEq` is const.
        let a = self.as_limbs();
        let b = other.as_limbs();
        let mut i = 0;
        let mut r = true;
        while i < LIMBS {

From src/cmp.rs:43

Metadata

Metadata

Assignees

Labels

to doTo be donetrackerIssue tracked by bot

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions