Skip to content

Commit

Permalink
Update im-rc to 15.0.0
Browse files Browse the repository at this point in the history
Hopefully just a routine update triggered by dependabot!
  • Loading branch information
alexcrichton committed May 18, 2020
1 parent 13bded9 commit b5c1919
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
12 changes: 6 additions & 6 deletions src/cargo/util/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl<N: Eq + Ord + Clone, E: Default + Clone> Graph<N, E> {
self.nodes.get(from)?.get(to)
}

pub fn edges(&self, from: &N) -> impl Iterator<Item = &(N, E)> {
pub fn edges(&self, from: &N) -> impl Iterator<Item = (&N, &E)> {
self.nodes.get(from).into_iter().flat_map(|x| x.iter())
}

Expand Down Expand Up @@ -95,8 +95,8 @@ impl<N: Eq + Ord + Clone, E: Default + Clone> Graph<N, E> {
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;
Expand All @@ -114,11 +114,11 @@ impl<N: Eq + Ord + Clone, E: Default + Clone> Graph<N, E> {
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);
Expand Down

0 comments on commit b5c1919

Please sign in to comment.