From: Mark Thom Date: Wed, 16 Oct 2019 14:38:33 +0000 (-0300) Subject: eliminate lingering attribute goals X-Git-Tag: v0.8.112^0 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=42a3bdc35760fe5cd06a2f19a1e81f0ea31e7613;p=scryer-prolog.git eliminate lingering attribute goals --- diff --git a/Cargo.toml b/Cargo.toml index 3f54571c..3f8f343c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "scryer-prolog" -version = "0.8.111" +version = "0.8.112" authors = ["Mark Thom "] build = "build.rs" repository = "https://github.com/mthom/scryer-prolog" diff --git a/src/prolog/fixtures.rs b/src/prolog/fixtures.rs index 31cc54c5..5decc89c 100644 --- a/src/prolog/fixtures.rs +++ b/src/prolog/fixtures.rs @@ -191,7 +191,7 @@ impl<'a> VariableFixtures<'a> { for term_ref in iter { if let &TermRef::Var(lvl, cell, ref var) = &term_ref { - let mut status = self.perm_vars.remove(var).unwrap_or(( + let mut status = self.perm_vars.swap_remove(var).unwrap_or(( VarStatus::Temp(chunk_num, TempVarData::new(lt_arity)), Vec::new(), )); diff --git a/src/prolog/machine/attributed_variables.rs b/src/prolog/machine/attributed_variables.rs index afba3106..c1af6aab 100644 --- a/src/prolog/machine/attributed_variables.rs +++ b/src/prolog/machine/attributed_variables.rs @@ -34,6 +34,7 @@ impl AttrVarInitializer { pub(super) fn reset(&mut self) { self.attr_var_queue.clear(); self.bindings.clear(); + self.attribute_goals.clear(); } }