File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,21 @@ impl ConflictStoreTrie {
24
24
) -> Option < & BTreeMap < PackageId , ConflictReason > > {
25
25
match self {
26
26
ConflictStoreTrie :: Leaf ( c) => {
27
- if must_contain. map ( |f| c. contains_key ( & f) ) . unwrap_or ( true ) {
28
- // is_conflicting checks that all the elements are active,
29
- // but we have checked each one by the recursion of this function.
30
- debug_assert ! ( cx. is_conflicting( None , c) ) ;
31
- Some ( c)
32
- } else {
33
- None
34
- }
27
+ // is_conflicting checks that all the elements are active,
28
+ // but we have checked each one by the recursion of this function.
29
+ debug_assert ! ( cx. is_conflicting( None , c) ) ;
30
+ Some ( c)
35
31
}
36
32
ConflictStoreTrie :: Node ( m) => {
37
- for ( & pid, store) in m {
33
+ for ( & pid, store) in must_contain
34
+ . map ( |f| m. range ( ..=f) )
35
+ . unwrap_or_else ( || m. range ( ..) )
36
+ {
38
37
// if the key is active then we need to check all of the corresponding subTrie.
39
38
if cx. is_active ( pid) {
40
- if let Some ( o) = store. find_conflicting ( cx, must_contain) {
39
+ if let Some ( o) =
40
+ store. find_conflicting ( cx, must_contain. filter ( |& f| f == pid) )
41
+ {
41
42
return Some ( o) ;
42
43
}
43
44
} // else, if it is not active then there is no way any of the corresponding
You can’t perform that action at this time.
0 commit comments