alloy-rs / alloy-rs/ruint

`cmp`: Replace with `self == other` and deprecate once `PartialEq` is

Đang mở
#628 0 bình luận 0 reaction 1 người được giao Được @decofe nhận Xem trên GitHub
to do tracker
Ngôn ngữ chính
Rust
Star
225
Fork
70
Merge trung bình
16 giờ 54 phút
Pull request đã merge (30 ngày)
8

Mô tả

*On 2026-08-31 @decofe wrote in [`a9450b4`](https://github.com/alloy-rs/ruint/commit/a9450b499c03f259238c2955b9512de873a77e12) “chore: apply latest nightly rustfmt (#627)”:*

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

```rust
pub const fn const_eq(&self, other: &Self) -> bool {
as_primitives!(self, other; {
u64(x, y) => return x == y,
u128(x, y) => return x == y,
});
// TODO: Replace with `self == other` and deprecate once `PartialEq` is
// const.
let a = self.as_limbs();
let b = other.as_limbs();
let mut equal_count = 0usize;
const_range_for!(i in 0..LIMBS => {
equal_count += (a[i] == b[i]) as usize;

```
*From [`src/cmp.rs:165`](https://github.com/alloy-rs/ruint/blob/a9450b499c03f259238c2955b9512de873a77e12/src/cmp.rs#L165)*

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.