pub fn validate_topo_sort<Id, PredsIter>(
topo_sort: impl IntoIterator<Item = Id>,
preds_fn: impl FnMut(Id) -> PredsIter,
) -> Result<(), (Id, Id)>Expand description
Validates the topo sort.
Returns Ok(()) if it is valid. Returns Err((pred, succ)) where pred comes after succ when the sort is
invalid. Panics if a node returned by the pred_fn is missing from the sort.