make retract_local_clauses safe, remove warning about overwriting warning in do_not_duplicate_path_components test

This commit is contained in:
Mark Thom
2021-03-23 12:37:43 -06:00
parent 7520fe7000
commit 290cb1b517
2 changed files with 10 additions and 9 deletions

View File

@@ -344,7 +344,7 @@ impl<'a> LoadState<'a> {
key: PredicateKey,
clause_locs: &SliceDeque<usize>,
) {
let (clause_target_poses, is_dynamic) = self
let result_opt = self
.wam
.indices
.get_predicate_skeleton(&compilation_target, &key)
@@ -358,8 +358,9 @@ impl<'a> LoadState<'a> {
})
.collect(),
skeleton.is_dynamic)
}).unwrap();
});
if let Some((clause_target_poses, is_dynamic)) = result_opt {
self.retract_local_clauses_by_locs(
compilation_target,
key,
@@ -367,6 +368,7 @@ impl<'a> LoadState<'a> {
is_dynamic,
);
}
}
pub(super) fn retract_local_clauses_by_locs(
&mut self,

View File

@@ -29,7 +29,6 @@ fn do_not_duplicate_path_components() {
"\
caught: e\n\
false.\n\
Warning: overwriting $initialization_goals/1\n\
caught: e\n\
false.\n\
",