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 thefrom
of a link. - If direction is Reverse, the package should appear in the
from
of a link at least once before it appears in theto
of a link.