clippy fixes (#565)

This commit is contained in:
Conrado Gouvea 2023-10-20 12:12:46 -03:00 committed by GitHub
parent 5cd7964a54
commit 266f12624e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View File

@ -134,14 +134,7 @@ where
C: Ciphersuite,
{
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
let serialized_self = <<C::Group as Group>::Field>::little_endian_serialize(&self.0);
let serialized_other = <<C::Group as Group>::Field>::little_endian_serialize(&other.0);
// The default cmp uses lexicographic order; so we need the elements in big endian
serialized_self
.as_ref()
.iter()
.rev()
.partial_cmp(serialized_other.as_ref().iter().rev())
Some(self.cmp(other))
}
}

View File

@ -405,7 +405,7 @@ where
.expect("should be nonzero");
received_round1_packages
.entry(receiver_participant_identifier)
.or_insert_with(BTreeMap::new)
.or_default()
.insert(participant_identifier, round1_package.clone());
}
}