summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
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-ffi
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-ffi')
-rw-r--r--openpgp-ffi/tests/c-tests.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/tests/c-tests.rs b/openpgp-ffi/tests/c-tests.rs
index 33a52261..ee906b0e 100644
--- a/openpgp-ffi/tests/c-tests.rs
+++ b/openpgp-ffi/tests/c-tests.rs
@@ -162,7 +162,7 @@ fn for_all_tests<F>(path: &Path, mut fun: F)
}
if let Some(name) = exported_function_name(&line) {
- if test.len() > 0 {
+ if !test.is_empty() {
fun(path, test_starts_at, &name, replace(&mut test, vec![]),
run)?;
test.clear();
@@ -174,7 +174,7 @@ fn for_all_tests<F>(path: &Path, mut fun: F)
continue;
}
- if line == "//! ```" && test.len() > 0 {
+ if line == "//! ```" && !test.is_empty() {
let name = format!("{}_{}",
path.file_stem().unwrap().to_string_lossy(),
lineno); // XXX: nicer to point to the top