diff --git a/src/directed/bfs.rs b/src/directed/bfs.rs index eb5db0c6..dc52ce7c 100644 --- a/src/directed/bfs.rs +++ b/src/directed/bfs.rs @@ -171,7 +171,7 @@ where } } -/// Struct returned by [`bfs_reach`](crate::directed::bfs::bfs_reach). +/// Struct returned by [`bfs_reach`]. pub struct BfsReachable { i: usize, seen: FxIndexSet, diff --git a/src/directed/dfs.rs b/src/directed/dfs.rs index 406d6c50..9b3bfc17 100644 --- a/src/directed/dfs.rs +++ b/src/directed/dfs.rs @@ -126,7 +126,7 @@ where } } -/// Struct returned by [`dfs_reach`](crate::directed::dfs::dfs_reach). +/// Struct returned by [`dfs_reach`]. pub struct DfsReachable { to_see: Vec, seen: HashSet, diff --git a/src/directed/topological_sort.rs b/src/directed/topological_sort.rs index 50ee9876..761ae461 100644 --- a/src/directed/topological_sort.rs +++ b/src/directed/topological_sort.rs @@ -131,15 +131,16 @@ where /// - `nodes` is a collection of nodes. /// - `successors` returns a list of successors for a given node. /// -/// This function works like [`topological_sort`](self::topological_sort), but -/// rather than producing a single ordering of nodes, this function partitions -/// the nodes into groups: the first group contains all nodes with no -/// dependencies, the second group contains all nodes whose only dependencies -/// are in the first group, and so on. Concatenating the groups produces a -/// valid topological sort regardless of how the nodes within each group are -/// reordered. No guarantees are made about the order of nodes within each -/// group. Also, the list of `nodes` must be exhaustive, new nodes must not be -/// returned by the `successors` function. +/// This function works like [`topological_sort`], but rather than +/// producing a single ordering of nodes, this function partitions the +/// nodes into groups: the first group contains all nodes with no +/// dependencies, the second group contains all nodes whose only +/// dependencies are in the first group, and so on. Concatenating the +/// groups produces a valid topological sort regardless of how the +/// nodes within each group are reordered. No guarantees are made +/// about the order of nodes within each group. Also, the list of +/// `nodes` must be exhaustive, new nodes must not be returned by the +/// `successors` function. /// /// The function returns a collection of groups if there are no cycles in the /// graph and an error otherwise.