mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Remove Score Ord, PartialOrd, Eq and PartialEq impls (#6420)
* drop score Ord, PartialOrd, Eq and PartialEq impls
and impl total_cmp instead
* Revert "Fix test failure on Rust v1.81 (#6407)"
This reverts commit 8a085fc828.
* reverse in the compare function
* lint mdfiles
This commit is contained in:
@@ -2340,16 +2340,6 @@ mod tests {
|
||||
gossipsub_score: f64,
|
||||
}
|
||||
|
||||
// generate an arbitrary f64 while preventing NaN values
|
||||
fn arbitrary_f64(g: &mut Gen) -> f64 {
|
||||
loop {
|
||||
let val = f64::arbitrary(g);
|
||||
if !val.is_nan() {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Arbitrary for PeerCondition {
|
||||
fn arbitrary(g: &mut Gen) -> Self {
|
||||
let attestation_net_bitfield = {
|
||||
@@ -2375,9 +2365,9 @@ mod tests {
|
||||
outgoing: bool::arbitrary(g),
|
||||
attestation_net_bitfield,
|
||||
sync_committee_net_bitfield,
|
||||
score: arbitrary_f64(g),
|
||||
score: f64::arbitrary(g),
|
||||
trusted: bool::arbitrary(g),
|
||||
gossipsub_score: arbitrary_f64(g),
|
||||
gossipsub_score: f64::arbitrary(g),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user