@@ -138,17 +138,6 @@ impl<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> Incompatibilit
138
138
}
139
139
}
140
140
141
- /// Create an incompatibility to remember
142
- /// that a package version is not selectable
143
- /// because its dependencies are not usable.
144
- pub fn unusable_dependencies ( package : P , version : VS :: V , reason : M ) -> Self {
145
- let set = VS :: singleton ( version) ;
146
- Self {
147
- package_terms : SmallMap :: One ( [ ( package. clone ( ) , Term :: Positive ( set. clone ( ) ) ) ] ) ,
148
- kind : Kind :: Custom ( package, set, reason) ,
149
- }
150
- }
151
-
152
141
/// Build an incompatibility from a given dependency.
153
142
pub fn from_dependency ( package : P , versions : VS , dep : ( & P , & VS ) ) -> Self {
154
143
let ( p2, set2) = dep;
@@ -383,12 +372,12 @@ pub mod tests {
383
372
let mut store = Arena :: new( ) ;
384
373
let i1 = store. alloc( Incompatibility {
385
374
package_terms: SmallMap :: Two ( [ ( "p1" , t1. clone( ) ) , ( "p2" , t2. negate( ) ) ] ) ,
386
- kind: Kind :: <_ , _ , String > :: FromDependencyOf ( "p1 ", Range :: full( ) , "p2" , Range :: full ( ) )
375
+ kind: Kind :: Custom ( "0 ", Range :: full( ) , "foo" . to_string ( ) )
387
376
} ) ;
388
377
389
378
let i2 = store. alloc( Incompatibility {
390
379
package_terms: SmallMap :: Two ( [ ( "p2" , t2) , ( "p3" , t3. clone( ) ) ] ) ,
391
- kind: Kind :: <_ , _ , String > :: FromDependencyOf ( "p2 ", Range :: full( ) , "p3" , Range :: full ( ) )
380
+ kind: Kind :: Custom ( "0 ", Range :: full( ) , "bar" . to_string ( ) )
392
381
} ) ;
393
382
394
383
let mut i3 = Map :: default ( ) ;
0 commit comments