diff options
author | JSDurand <mmemmew@gmail.com> | 2023-07-19 13:49:14 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-07-19 13:49:14 +0800 |
commit | 9e907eca4eae64ddf546431b34b73a4e2cd9be23 (patch) | |
tree | 863550761642f293215a6b300365437f439ed6ad | |
parent | 575023d032affd6e180cd32259c464e84a0e31e9 (diff) |
graph: Add a future plan.
* graph/src/lib.rs: Add a plan to reduce the number of
bounds-checking. Hopefully this makes the package more efficient.
-rw-r--r-- | graph/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/graph/src/lib.rs b/graph/src/lib.rs index 87f39c0..9e5b1cc 100644 --- a/graph/src/lib.rs +++ b/graph/src/lib.rs @@ -289,6 +289,10 @@ pub trait LabelGraph<T: GraphLabel>: Graph { where Self: 'a; + // TODO: Add a type that iterates through children and labels of + // children simultaneously. This can reduce the number of bounds + // checking. + /// A type that iterates through labels. type LabelIter<'a>: Iterator<Item = (&'a T, <Self as LabelGraph<T>>::Iter<'a>)> + 'a where |