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 Oct 29, 2024
1 parent 4c60108 commit 13a9870
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 @@ -144,6 +144,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 @@ -161,8 +164,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 13a9870

Please sign in to comment.