Skip to content

Commit ad26b89

Browse files
committed
and links just to be throw
1 parent aa58d27 commit ad26b89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cargo/core/resolver/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ struct Context {
333333
// make these much cheaper to clone in general.
334334
activations: Activations,
335335
resolve_features: HashMap<PackageId, HashSet<InternedString>>,
336-
links: HashMap<String, PackageId>,
336+
links: HashMap<InternedString, PackageId>,
337337

338338
// These are two cheaply-cloneable lists (O(1) clone) which are effectively
339339
// hash maps but are built up as "construction lists". We'll iterate these
@@ -706,7 +706,7 @@ impl RemainingCandidates {
706706
fn next(
707707
&mut self,
708708
prev_active: &[Summary],
709-
links: &HashMap<String, PackageId>,
709+
links: &HashMap<InternedString, PackageId>,
710710
) -> Result<(Candidate, bool), HashMap<PackageId, ConflictReason>> {
711711
// Filter the set of candidates based on the previously activated
712712
// versions for this dependency. We can actually use a version if it
@@ -723,7 +723,7 @@ impl RemainingCandidates {
723723
use std::mem::replace;
724724
for (_, b) in self.remaining.by_ref() {
725725
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)) {
727727
if a != b.summary.package_id() {
728728
self.conflicting_prev_active
729729
.entry(a.clone())
@@ -1298,7 +1298,7 @@ impl Context {
12981298
if !prev.iter().any(|c| c == summary) {
12991299
self.resolve_graph.push(GraphNode::Add(id.clone()));
13001300
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(),
13021302
"Attempting to resolve a with more then one crate with the links={}. \n\
13031303
This will not build as is. Consider rebuilding the .lock file.", link);
13041304
}

0 commit comments

Comments
 (0)