summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-08-09 16:19:33 +0200
committerMatthias Beyer <mail@beyermatthias.de>2022-08-09 16:55:22 +0200
commit54b5c577f8029dd89ef4c53406addc17e242e813 (patch)
tree24afdf19388fb2a8f42ad773d15eb7e93d77831f
parentd8e499acafceec9e3ae85d677844f3ec32a0a71f (diff)
Replace assert!(false) with panic!()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/import.rs2
-rw-r--r--src/task.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/import.rs b/src/import.rs
index 943d0aa..1e84533 100644
--- a/src/import.rs
+++ b/src/import.rs
@@ -177,7 +177,7 @@ fn test_one_single() {
assert!(any_tag, "Tag {} missing", tag);
}
} else {
- assert!(false, "Tags completely missing");
+ panic!("Tags completely missing");
}
assert!(task.wait() == Some(&mkdate("20160508T164007Z")));
diff --git a/src/task.rs b/src/task.rs
index 2268fed..6899c79 100644
--- a/src/task.rs
+++ b/src/task.rs
@@ -934,7 +934,7 @@ mod test {
assert!(any_tag, "Tag {} missing", tag);
}
} else {
- assert!(false, "Tags completely missing");
+ panic!("Tags completely missing");
}
assert!(task.wait() == Some(&mkdate("20160508T164007Z")));
@@ -1010,7 +1010,7 @@ mod test {
assert!(r, "Annotation {:?} missing or buggy", annotation);
}
} else {
- assert!(false, "Annotations missing");
+ panic!("Annotations missing");
}
}
#[test]
@@ -1093,7 +1093,7 @@ mod test {
if let Some(priority) = task.priority() {
assert!(priority == &"U".to_string());
} else {
- assert!(false, "Priority completely missing");
+ panic!("Priority completely missing");
}
let back = serde_json::to_string_pretty(&task);