diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 20:23:44 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:59 +0200 |
commit | 19169b76117db8b1d81f1aafa64a5440d042803d (patch) | |
tree | bdd07c05920f6217bd1512e6dc56c1d8fb1da6bf /openpgp/src/cert/builder.rs | |
parent | 694680ae3b2192c102f1b9a4d342677545cac629 (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/cert/builder.rs')
-rw-r--r-- | openpgp/src/cert/builder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs index e62bd5d0..6117a325 100644 --- a/openpgp/src/cert/builder.rs +++ b/openpgp/src/cert/builder.rs @@ -1006,7 +1006,7 @@ impl CertBuilder<'_> { let mut cert = Cert::try_from(packets)?; - let have_userids = self.userids.len() > 0; + let have_userids = !self.userids.is_empty(); // Sign UserIDs. for (i, uid) in self.userids.into_iter().enumerate() { |