From 46d783d631373e6f3186d5046b8be0b83f2300c2 Mon Sep 17 00:00:00 2001 From: Jacob Finkelman Date: Thu, 21 Dec 2023 21:53:45 +0000 Subject: [PATCH] clippy --- src/internal/partial_solution.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/internal/partial_solution.rs b/src/internal/partial_solution.rs index 517cceb2..cf1d24db 100644 --- a/src/internal/partial_solution.rs +++ b/src/internal/partial_solution.rs @@ -143,6 +143,8 @@ pub enum SatisfierSearch { }, } +type SatisfiedMap<'i, P, VS> = SmallMap<&'i P, (Option>, u32, DecisionLevel)>; + impl PartialSolution { /// Initialize an empty PartialSolution. pub fn empty() -> Self { @@ -402,7 +404,7 @@ impl PartialSolution PartialSolution( incompat: &'i Incompatibility, package_assignments: &FnvIndexMap>, - ) -> SmallMap<&'i P, (Option>, u32, DecisionLevel)> { + ) -> SatisfiedMap<'i, P, VS> { let mut satisfied = SmallMap::Empty; for (package, incompat_term) in incompat.iter() { let pa = package_assignments.get(package).expect("Must exist"); @@ -446,7 +448,7 @@ impl PartialSolution( incompat: &Incompatibility, satisfier_package: &'i P, - mut satisfied_map: SmallMap<&'i P, (Option>, u32, DecisionLevel)>, + mut satisfied_map: SatisfiedMap<'i, P, VS>, package_assignments: &FnvIndexMap>, store: &Arena>, ) -> DecisionLevel { @@ -499,9 +501,9 @@ impl PackageAssignments { let idx = self .dated_derivations .as_slice() - .partition_point(|dd| dd.accumulated_intersection.intersection(&start_term) != empty); + .partition_point(|dd| dd.accumulated_intersection.intersection(start_term) != empty); if let Some(dd) = self.dated_derivations.get(idx) { - debug_assert_eq!(dd.accumulated_intersection.intersection(&start_term), empty); + debug_assert_eq!(dd.accumulated_intersection.intersection(start_term), empty); return (Some(dd.cause), dd.global_index, dd.decision_level); } // If it wasn't found in the derivations,