Leave residual goals for later

This commit is contained in:
bakaq
2024-12-12 05:43:23 -03:00
parent a75266c3ce
commit 17293a5753

View File

@@ -31,16 +31,12 @@ pub enum LeafAnswer {
False, False,
/// An exception leaf answer. /// An exception leaf answer.
Exception(Term), Exception(Term),
/// A leaf answer with bindings and residual goals. /// A leaf answer with bindings.
#[non_exhaustive]
LeafAnswer { LeafAnswer {
/// The bindings of variables in the query. /// The bindings of variables in the query.
///
/// Can be empty.
bindings: BTreeMap<String, Term>, bindings: BTreeMap<String, Term>,
/// Residual goals. //residual_goals: Vec<Term>,
///
/// Can be empty.
residual_goals: Vec<Term>,
}, },
} }
@@ -49,7 +45,6 @@ impl LeafAnswer {
pub fn from_bindings<S: Into<String>>(bindings: impl IntoIterator<Item = (S, Term)>) -> Self { pub fn from_bindings<S: Into<String>>(bindings: impl IntoIterator<Item = (S, Term)>) -> Self {
LeafAnswer::LeafAnswer { LeafAnswer::LeafAnswer {
bindings: bindings.into_iter().map(|(k, v)| (k.into(), v)).collect(), bindings: bindings.into_iter().map(|(k, v)| (k.into(), v)).collect(),
residual_goals: Vec::new(),
} }
} }
} }