summaryrefslogtreecommitdiffstats
path: root/openpgp/examples
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 /openpgp/examples
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 'openpgp/examples')
-rw-r--r--openpgp/examples/statistics.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/openpgp/examples/statistics.rs b/openpgp/examples/statistics.rs
index 502af558..fc262ee8 100644
--- a/openpgp/examples/statistics.rs
+++ b/openpgp/examples/statistics.rs
@@ -427,7 +427,7 @@ fn main() -> openpgp::Result<()> {
}
}
- if key_flags.len() > 0 {
+ if !key_flags.is_empty() {
println!();
println!("# KeyFlags statistics");
println!();
@@ -443,7 +443,7 @@ fn main() -> openpgp::Result<()> {
}
}
- if p_sym.len() > 0 {
+ if !p_sym.is_empty() {
println!();
println!("# PreferredSymmetricAlgorithms statistics");
println!();
@@ -462,7 +462,7 @@ fn main() -> openpgp::Result<()> {
}
}
- if p_hashes.len() > 0 {
+ if !p_hashes.is_empty() {
println!();
println!("# PreferredHashlgorithms statistics");
println!();
@@ -482,7 +482,7 @@ fn main() -> openpgp::Result<()> {
}
}
- if p_comp.len() > 0 {
+ if !p_comp.is_empty() {
println!();
println!("# PreferredCompressionAlgorithms statistics");
println!();
@@ -502,7 +502,7 @@ fn main() -> openpgp::Result<()> {
}
}
- if p_aead.len() > 0 {
+ if !p_aead.is_empty() {
println!();
println!("# PreferredAEADAlgorithms statistics");
println!();