Add safety comments

This commit is contained in:
junderw 2023-06-25 11:36:04 -07:00 committed by Mononaut
parent e3f4c33f03
commit e61ae59e53
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -44,6 +44,8 @@ impl Eq for AuditTransaction {}
impl PartialOrd for AuditTransaction {
fn partial_cmp(&self, other: &AuditTransaction) -> Option<Ordering> {
// If either score is NaN, this is false,
// and partial_cmp will return None
if self.score == other.score {
Some(self.uid.cmp(&other.uid))
} else {