summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openpgp/src/crypto/mpi.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/openpgp/src/crypto/mpi.rs b/openpgp/src/crypto/mpi.rs
index 6814e61f..d7e91d2c 100644
--- a/openpgp/src/crypto/mpi.rs
+++ b/openpgp/src/crypto/mpi.rs
@@ -673,11 +673,9 @@ impl PartialOrd for SecretKeyMaterial {
a.cmp(b)
}).collect::<Vec<_>>();
- iter::once(&o1)
- .chain(on.iter())
- .find(|&&x| x != Ordering::Equal)
- .cloned()
- .unwrap_or(Ordering::Equal)
+ iter::once(o1)
+ .chain(on.iter().cloned())
+ .fold(Ordering::Equal, |acc, x| acc.then(x))
}
(a, b) => {