diff --git a/Cargo.toml b/Cargo.toml index ef5857b84..1a30c7064 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ walkdir = "2.2" clap = "2.31.2" unicode-width = "0.1.5" openssl = { version = '0.10.11', optional = true } -im-rc = "14.0.0" +im-rc = "15.0.0" # A noop dependency that changes in the Rust repository, it's a bit of a hack. # See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` diff --git a/src/cargo/core/resolver/mod.rs b/src/cargo/core/resolver/mod.rs index cde34a220..cb0e76025 100644 --- a/src/cargo/core/resolver/mod.rs +++ b/src/cargo/core/resolver/mod.rs @@ -844,7 +844,7 @@ fn generalize_conflicting( for (critical_parent, critical_parents_deps) in cx.parents.edges(&backtrack_critical_id).filter(|(p, _)| { // it will only help backjump further if it is older then the critical_age - cx.is_active(*p).expect("parent not currently active!?") < backtrack_critical_age + cx.is_active(**p).expect("parent not currently active!?") < backtrack_critical_age }) { for critical_parents_dep in critical_parents_deps.iter() { diff --git a/src/cargo/util/graph.rs b/src/cargo/util/graph.rs index 8d2dc5b84..e5db1319e 100644 --- a/src/cargo/util/graph.rs +++ b/src/cargo/util/graph.rs @@ -37,7 +37,7 @@ impl Graph { self.nodes.get(from)?.get(to) } - pub fn edges(&self, from: &N) -> impl Iterator { + pub fn edges(&self, from: &N) -> impl Iterator { self.nodes.get(from).into_iter().flat_map(|x| x.iter()) } @@ -95,8 +95,8 @@ impl Graph { p.iter() // Note that we can have "cycles" introduced through dev-dependency // edges, so make sure we don't loop infinitely. - .find(|&(node, _)| !result.contains(&node)) - .map(|(ref p, _)| p) + .find(|(node, _)| !result.contains(node)) + .map(|(p, _)| p) }) { result.push(p); pkg = p; @@ -114,11 +114,11 @@ impl Graph { let first_pkg_depending_on = |pkg: &N, res: &[&N]| { self.nodes .iter() - .filter(|&(_, adjacent)| adjacent.contains_key(pkg)) + .filter(|(_, adjacent)| adjacent.contains_key(pkg)) // Note that we can have "cycles" introduced through dev-dependency // edges, so make sure we don't loop infinitely. - .find(|&(node, _)| !res.contains(&node)) - .map(|(ref p, _)| p) + .find(|(node, _)| !res.contains(node)) + .map(|(p, _)| p) }; while let Some(p) = first_pkg_depending_on(pkg, &result) { result.push(p);