summaryrefslogtreecommitdiffstats
path: root/openpgp/src/types
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/types
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/types')
-rw-r--r--openpgp/src/types/bitfield.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/types/bitfield.rs b/openpgp/src/types/bitfield.rs
index 7de2311e..c6dd5f13 100644
--- a/openpgp/src/types/bitfield.rs
+++ b/openpgp/src/types/bitfield.rs
@@ -77,7 +77,7 @@ impl Bitfield {
/// Remove any trailing padding.
fn clear_padding(mut self) -> Self {
- while self.raw.len() > 0 && self.raw[self.raw.len() - 1] == 0 {
+ while !self.raw.is_empty() && self.raw[self.raw.len() - 1] == 0 {
self.raw.truncate(self.raw.len() - 1);
}