mirror of
https://github.com/mempool/mempool.git
synced 2025-03-15 04:11:48 +01:00
Add safety comments
This commit is contained in:
parent
e3f4c33f03
commit
e61ae59e53
1 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,8 @@ impl Eq for AuditTransaction {}
|
||||||
|
|
||||||
impl PartialOrd for AuditTransaction {
|
impl PartialOrd for AuditTransaction {
|
||||||
fn partial_cmp(&self, other: &AuditTransaction) -> Option<Ordering> {
|
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 {
|
if self.score == other.score {
|
||||||
Some(self.uid.cmp(&other.uid))
|
Some(self.uid.cmp(&other.uid))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue