summaryrefslogtreecommitdiffstats
path: root/sqv/src
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 20:23:44 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit19169b76117db8b1d81f1aafa64a5440d042803d (patch)
treebdd07c05920f6217bd1512e6dc56c1d8fb1da6bf /sqv/src
parent694680ae3b2192c102f1b9a4d342677545cac629 (diff)
Lint: Use is_empty().
- https://rust-lang.github.io/rust-clippy/master/index.html#len_zero - https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
Diffstat (limited to 'sqv/src')
-rw-r--r--sqv/src/sqv.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs
index 2ba9765a..a9828ee0 100644
--- a/sqv/src/sqv.rs
+++ b/sqv/src/sqv.rs
@@ -98,7 +98,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
let (certs, errs) = certs.into_iter().fold(
(Vec::with_capacity(count), Vec::new()),
|(mut certs, mut errs), a| {
- if certs.len() == 0 {
+ if certs.is_empty() {
certs.push(a);
} else if certs[certs.len() - 1].fingerprint() == a.fingerprint() {
// Merge `a` into the last element.
@@ -113,7 +113,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
(certs, errs)
});
- if errs.len() > 0 {
+ if !errs.is_empty() {
eprintln!("Error merging duplicate keys:");
for err in errs.iter() {
eprintln!(" {}", err);