Assert against empty conjunctions and disjunctions
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user