summaryrefslogtreecommitdiffstats
path: root/openpgp/src/armor/base64_utils.rs
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/src/armor/base64_utils.rs
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/src/armor/base64_utils.rs')
-rw-r--r--openpgp/src/armor/base64_utils.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/armor/base64_utils.rs b/openpgp/src/armor/base64_utils.rs
index 9e7fe500..aac7ae2a 100644
--- a/openpgp/src/armor/base64_utils.rs
+++ b/openpgp/src/armor/base64_utils.rs
@@ -165,7 +165,7 @@ pub fn is_armored_pgp_blob(bytes: &[u8]) -> bool {
match base64::decode_config(&bytes, base64::STANDARD) {
Ok(d) => {
// Don't consider an empty message to be valid.
- if d.len() == 0 {
+ if d.is_empty() {
false
} else {
let mut br = buffered_reader::Memory::new(&d);