Skip to content

Commit 45644fd

Browse files
Fix invalid cfg attr & non_canonical_partial_ord (#1794)
1 parent 1155370 commit 45644fd

File tree

2 files changed

+3
-3
lines changed
  • modules/antiflood-tokens

2 files changed

+3
-3
lines changed

modules/antiflood-tokens/delegates/token-generator/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ impl TokenAssignmentInternal for TokenAllocationRecord {
310310
Some(currently_assigned) => {
311311
let mut oldest_valid_observed = None;
312312
let mut first_valid = None;
313-
for (_idx, assignment) in currently_assigned.iter().enumerate() {
313+
for assignment in currently_assigned.iter() {
314314
// dbg!(
315315
// oldest_valid_observed.map(|a: &TokenAssignment| a.time_slot),
316316
// first_valid,

modules/antiflood-tokens/interfaces/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ impl TokenAssignment {
728728
TokenAssignment::signature_content(&self.time_slot, self.tier, &self.assignment_hash);
729729
if verifying_key.verify(&msg, &self.signature).is_err() {
730730
// not signed by the private key of this generator
731-
#[cfg(all(target_family = "wasm", features = "contract"))]
731+
#[cfg(all(target_family = "wasm", feature = "contract"))]
732732
{
733733
freenet_stdlib::log::info(&format!(
734734
"failed verification of message `{msg:?}` with signature: `{sig}`",
@@ -743,7 +743,7 @@ impl TokenAssignment {
743743

744744
impl PartialOrd for TokenAssignment {
745745
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
746-
Some(self.time_slot.cmp(&other.time_slot))
746+
Some(self.cmp(other))
747747
}
748748
}
749749

0 commit comments

Comments
 (0)