@@ -333,7 +333,7 @@ struct Context {
333
333
// make these much cheaper to clone in general.
334
334
activations : Activations ,
335
335
resolve_features : HashMap < PackageId , HashSet < InternedString > > ,
336
- links : HashMap < String , PackageId > ,
336
+ links : HashMap < InternedString , PackageId > ,
337
337
338
338
// These are two cheaply-cloneable lists (O(1) clone) which are effectively
339
339
// hash maps but are built up as "construction lists". We'll iterate these
@@ -706,7 +706,7 @@ impl RemainingCandidates {
706
706
fn next (
707
707
& mut self ,
708
708
prev_active : & [ Summary ] ,
709
- links : & HashMap < String , PackageId > ,
709
+ links : & HashMap < InternedString , PackageId > ,
710
710
) -> Result < ( Candidate , bool ) , HashMap < PackageId , ConflictReason > > {
711
711
// Filter the set of candidates based on the previously activated
712
712
// versions for this dependency. We can actually use a version if it
@@ -723,7 +723,7 @@ impl RemainingCandidates {
723
723
use std:: mem:: replace;
724
724
for ( _, b) in self . remaining . by_ref ( ) {
725
725
if let Some ( link) = b. summary . links ( ) {
726
- if let Some ( a) = links. get ( link) {
726
+ if let Some ( a) = links. get ( & InternedString :: new ( link) ) {
727
727
if a != b. summary . package_id ( ) {
728
728
self . conflicting_prev_active
729
729
. entry ( a. clone ( ) )
@@ -1298,7 +1298,7 @@ impl Context {
1298
1298
if !prev. iter ( ) . any ( |c| c == summary) {
1299
1299
self . resolve_graph . push ( GraphNode :: Add ( id. clone ( ) ) ) ;
1300
1300
if let Some ( link) = summary. links ( ) {
1301
- ensure ! ( self . links. insert( link . to_owned ( ) , id. clone( ) ) . is_none( ) ,
1301
+ ensure ! ( self . links. insert( InternedString :: new ( link ) , id. clone( ) ) . is_none( ) ,
1302
1302
"Attempting to resolve a with more then one crate with the links={}. \n \
1303
1303
This will not build as is. Consider rebuilding the .lock file.", link) ;
1304
1304
}
0 commit comments