check for empty heads after adding parent

This commit is contained in:
lcnr 2025-10-02 12:09:54 +02:00
parent 42b384ec0d
commit 1e772f9681

View file

@ -969,10 +969,6 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D, X> {
return true;
};
let Some(new_highest_head_index) = heads.opt_highest_cycle_head_index() else {
return false;
};
// We're rebasing an entry `e` over a head `p`. This head
// has a number of own heads `h` it depends on.
//
@ -1046,6 +1042,10 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D, X> {
};
}
let Some(new_highest_head_index) = heads.opt_highest_cycle_head_index() else {
return false;
};
// We now care about the path from the next highest cycle head to the
// provisional cache entry.
*path_from_head = path_from_head.extend(Self::cycle_path_kind(