From 2e84f34cf375fa3d12c73d1f28d68f0be9de3dc4 Mon Sep 17 00:00:00 2001 From: apogeeoak <59737221+apogeeoak@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:21:18 -0500 Subject: [PATCH] chore: Updated source to follow clippy suggestions. --- src/main.rs | 2 +- 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 ));