@@ -52,19 +52,16 @@ enum Kind<P: Package, V: Version> {
52
52
DerivedFrom ( IncompId < P , V > , IncompId < P , V > ) ,
53
53
}
54
54
55
- /// A type alias for a pair of [Package] and a corresponding [Term].
56
- pub type PackageTerm < P , V > = ( P , Term < V > ) ;
57
-
58
55
/// A Relation describes how a set of terms can be compared to an incompatibility.
59
56
/// Typically, the set of terms comes from the partial solution.
60
57
#[ derive( Eq , PartialEq ) ]
61
- pub enum Relation < P : Package , V : Version > {
58
+ pub enum Relation < P : Package > {
62
59
/// We say that a set of terms S satisfies an incompatibility I
63
60
/// if S satisfies every term in I.
64
61
Satisfied ,
65
62
/// We say that S contradicts I
66
63
/// if S contradicts at least one term in I.
67
- Contradicted ( PackageTerm < P , V > ) ,
64
+ Contradicted ( P ) ,
68
65
/// If S satisfies all but one of I's terms and is inconclusive for the remaining term,
69
66
/// we say S "almost satisfies" I and we call the remaining term the "unsatisfied term".
70
67
AlmostSatisfied ( P ) ,
@@ -166,13 +163,13 @@ impl<P: Package, V: Version> Incompatibility<P, V> {
166
163
}
167
164
168
165
/// CF definition of Relation enum.
169
- pub fn relation ( & self , mut terms : impl FnMut ( & P ) -> Option < Term < V > > ) -> Relation < P , V > {
166
+ pub fn relation ( & self , mut terms : impl FnMut ( & P ) -> Option < Term < V > > ) -> Relation < P > {
170
167
let mut relation = Relation :: Satisfied ;
171
168
for ( package, incompat_term) in self . package_terms . iter ( ) {
172
169
match terms ( package) . map ( |term| incompat_term. relation_with ( & term) ) {
173
170
Some ( term:: Relation :: Satisfied ) => { }
174
171
Some ( term:: Relation :: Contradicted ) => {
175
- return Relation :: Contradicted ( ( package. clone ( ) , incompat_term . clone ( ) ) ) ;
172
+ return Relation :: Contradicted ( package. clone ( ) ) ;
176
173
}
177
174
None | Some ( term:: Relation :: Inconclusive ) => {
178
175
// If a package is not present, the intersection is the same as [Term::any].
0 commit comments