summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs2
-rw-r--r--tests/integration_tests.rs2
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
));