Skip to content

Commit 111e8d2

Browse files
committed
don't add empty relations
1 parent 6d7c218 commit 111e8d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ impl<Tuple: Ord> Variable<Tuple> {
285285
/// it is not obvious that it should be commonly used otherwise, but
286286
/// it should not be harmful.
287287
pub fn insert(&self, relation: Relation<Tuple>) {
288-
self.to_add.borrow_mut().push(relation);
288+
if !relation.is_empty() {
289+
self.to_add.borrow_mut().push(relation);
290+
}
289291
}
290292
/// Consumes the variable and returns a relation.
291293
///

0 commit comments

Comments
 (0)