From 2f0d32d4447bdf42e8cb57d4067549543fca3074 Mon Sep 17 00:00:00 2001 From: Rain Date: Fri, 27 Mar 2020 19:44:02 -0700 Subject: [PATCH] [feature] add a comment to a collect() This wasn't really obvious to me when I was looking at this code. --- guppy/src/graph/feature/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guppy/src/graph/feature/build.rs b/guppy/src/graph/feature/build.rs index 9dc75432968..de59462a13a 100644 --- a/guppy/src/graph/feature/build.rs +++ b/guppy/src/graph/feature/build.rs @@ -135,7 +135,10 @@ impl<'g> FeatureGraphBuildState<'g> { } } }) + // The filter_map above holds an &mut reference to self, which is why it needs to be + // collected. .collect(); + // Don't create a map to the base 'from' node since it is already created in // add_nodes. self.add_edges(from_node, to_nodes, FeatureEdge::FeatureDependency);