File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use crate::util::Graph;
11
11
12
12
use super :: dep_cache:: RegistryQueryer ;
13
13
use super :: errors:: ActivateResult ;
14
- use super :: types:: { ConflictMap , FeaturesSet , ResolveOpts } ;
14
+ use super :: types:: { ConflictMap , ConflictReason , FeaturesSet , ResolveOpts } ;
15
15
16
16
pub use super :: encode:: Metadata ;
17
17
pub use super :: encode:: { EncodableDependency , EncodablePackageId , EncodableResolve } ;
@@ -151,7 +151,11 @@ impl Context {
151
151
if dep. source_id ( ) != id. source_id ( ) {
152
152
let key = ( id. name ( ) , dep. source_id ( ) , id. version ( ) . into ( ) ) ;
153
153
let prev = self . activations . insert ( key, ( summary. clone ( ) , age) ) ;
154
- assert ! ( prev. is_none( ) ) ;
154
+ if let Some ( ( previous_summary, _) ) = prev {
155
+ return Err (
156
+ ( previous_summary. package_id ( ) , ConflictReason :: Semver ) . into ( )
157
+ ) ;
158
+ }
155
159
}
156
160
}
157
161
You can’t perform that action at this time.
0 commit comments