Handled the empty case (#770)

This commit is contained in:
notoria
2021-01-31 11:03:17 +01:00
parent dfd7ac633a
commit e5204e55d3

View File

@@ -341,7 +341,13 @@ impl PredicateClause {
_ => None,
}
},
PredicateClause::Rule(ref rule, ..) => Some(&rule.head.1),
PredicateClause::Rule(ref rule, ..) => {
if rule.head.1.is_empty() {
None
} else {
Some(&rule.head.1)
}
}
}
}