Function assert_link_order

Source
pub fn assert_link_order<'g>(
    links: impl IntoIterator<Item = PackageLink<'g>>,
    initial: impl IntoIterator<Item = &'g PackageId>,
    desc: impl Into<DirectionDesc<'g>>,
    msg: &str,
)
Expand description

Assert that links are presented in the expected order.

For any given package not in the initial set:

  • If direction is Forward, the package should appear in the to of a link at least once before it appears in the from of a link.
  • If direction is Reverse, the package should appear in the from of a link at least once before it appears in the to of a link.