From d3c81065ebf9bb5bc17e23e4e3c5547b8221c6f1 Mon Sep 17 00:00:00 2001 From: Jacob Finkelman Date: Tue, 2 Jan 2024 19:41:00 +0000 Subject: [PATCH] a cheaper check --- src/internal/core.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/core.rs b/src/internal/core.rs index 7ed2218c..2f47555a 100644 --- a/src/internal/core.rs +++ b/src/internal/core.rs @@ -131,7 +131,7 @@ impl State { break; } Relation::AlmostSatisfied(package_almost) => { - if !self.unit_propagation_buffer.contains(&package_almost) { + if self.unit_propagation_buffer.last() != Some(&package_almost) { self.unit_propagation_buffer.push(package_almost.clone()); } // Add (not term) to the partial solution with incompat as cause.