Skip to content

Commit

Permalink
Merge external custom reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jun 5, 2024
1 parent 1a70e21 commit a68cbd1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ impl<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> DerivationTree
//
// Cannot be merged because the reason may not match
DerivationTree::External(External::NoVersions(_, _)) => None,
DerivationTree::External(External::Custom(_, r, reason)) => Some(
DerivationTree::External(External::Custom(package, set.union(&r), reason)),
),
DerivationTree::External(External::FromDependencyOf(p1, r1, p2, r2)) => {
if p1 == package {
Some(DerivationTree::External(External::FromDependencyOf(
Expand All @@ -164,8 +167,6 @@ impl<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> DerivationTree
)))
}
}
// Cannot be merged because the reason may not match
DerivationTree::External(External::Custom(_, _, _)) => None,
}
}
}
Expand Down

0 comments on commit a68cbd1

Please sign in to comment.