Assert against empty conjunctions and disjunctions

This commit is contained in:
2020-02-02 17:46:55 +01:00
parent 6163c5b259
commit 25c567af06
2 changed files with 8 additions and 0 deletions

View File

@@ -491,6 +491,8 @@ impl Formula
{
pub fn and(arguments: Formulas) -> Self
{
assert!(!arguments.is_empty());
Self::And(arguments)
}
@@ -566,6 +568,8 @@ impl Formula
pub fn or(arguments: Formulas) -> Self
{
assert!(!arguments.is_empty());
Self::Or(arguments)
}