From 2b3eac5e52a768ed83a3ad334067526d8af1dfb9 Mon Sep 17 00:00:00 2001 From: Justus Adam Date: Fri, 31 May 2024 14:03:40 -0700 Subject: [PATCH] Eliminate this intermediate vec --- crates/flowistry_pdg_construction/src/construct.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/flowistry_pdg_construction/src/construct.rs b/crates/flowistry_pdg_construction/src/construct.rs index f06e82df38..4df907454e 100644 --- a/crates/flowistry_pdg_construction/src/construct.rs +++ b/crates/flowistry_pdg_construction/src/construct.rs @@ -794,19 +794,18 @@ impl<'tcx> GraphConstructor<'tcx> { ) -> Vec<(Place<'tcx>, DepNode<'tcx>)> { // **POINTER-SENSITIVITY:** // If `mutated` involves indirection via dereferences, then resolve it to the direct places it could point to. - let aliases = self.aliases(mutated).collect_vec(); + let aliases = self.aliases(mutated); // **FIELD-SENSITIVITY:** we do NOT deal with fields on *writes* (in this function), // only on *reads* (in `add_input_to_op`). // For each mutated `dst`: aliases - .iter() .map(|dst| { // Create a destination node for (DST @ CURRENT_LOC). ( - *dst, - DepNode::new(*dst, self.make_call_string(location), self.tcx, &self.body), + dst, + DepNode::new(dst, self.make_call_string(location), self.tcx, &self.body), ) }) .collect()