diff options
Diffstat (limited to 'ffi/tests/c-tests.rs')
-rw-r--r-- | ffi/tests/c-tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ffi/tests/c-tests.rs b/ffi/tests/c-tests.rs index 4dd5f616..40f82094 100644 --- a/ffi/tests/c-tests.rs +++ b/ffi/tests/c-tests.rs @@ -163,7 +163,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(); @@ -175,7 +175,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 |