diff options
| author | apogeeoak <59737221+apogeeoak@users.noreply.github.com> | 2021-02-09 18:21:18 -0500 |
|---|---|---|
| committer | apogeeoak <59737221+apogeeoak@users.noreply.github.com> | 2021-02-09 18:21:18 -0500 |
| commit | 2e84f34cf375fa3d12c73d1f28d68f0be9de3dc4 (patch) | |
| tree | 2a2053ed6ffecc8c0b9ca1bc0fefc4d7d23ce100 | |
| parent | b4a41385591e5d5b151f27f72fae39535afd4dd0 (diff) | |
chore: Updated source to follow clippy suggestions.
| -rw-r--r-- | src/main.rs | 2 | ||||
| -rw-r--r-- | tests/integration_tests.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 75a9cec..50e4a38 100644 --- a/src/main.rs +++ b/src/main.rs @@ -142,7 +142,7 @@ fn main() { let fname = format!("{}", e.path.display()); let filter_cond = filters .split(',') - .filter(|f| f.trim().len() > 0) + .filter(|f| !f.trim().is_empty()) .any(|f| e.name.contains(&f) || fname.contains(&f)); let status = if e.looks_done() { "Done" } else { "Pending" }; let solve_cond = { diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index f5211b6..1bd3bf7 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -131,7 +131,7 @@ fn all_exercises_require_confirmation() { file.read_to_string(&mut s).unwrap(); s }; - source.matches("// I AM NOT DONE").next().expect(&format!( + source.matches("// I AM NOT DONE").next().unwrap_or_else(|| panic!( "There should be an `I AM NOT DONE` annotation in {:?}", path )); |
