From c9b561485b347eb3ea8884339144888d80fdacc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20H=C3=A9=20=28S=C4=ABch=C3=A0ng=29?= Date: Thu, 1 Feb 2024 19:10:49 +0800 Subject: [PATCH] fix looping through peerings --- .../src/evcxr_examples/object_referred_in_rules.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/route_verification/src/evcxr_examples/object_referred_in_rules.rs b/route_verification/src/evcxr_examples/object_referred_in_rules.rs index b3a2994..ff938d8 100644 --- a/route_verification/src/evcxr_examples/object_referred_in_rules.rs +++ b/route_verification/src/evcxr_examples/object_referred_in_rules.rs @@ -119,13 +119,9 @@ fn object_referred_in_rules(query: QueryIr) { impl QueryRecord { fn add_rule(&mut self, entry: &Entry, is_export: bool) { let mut as_expr_appeared = Appeared::default(); - entry - .mp_peerings - .iter() - .map(|peering_action| &peering_action.mp_peering.remote_as) - .map(|as_expr| { - as_expr_appeared.collect_as_expr(as_expr); - }); + for peering_action in &entry.mp_peerings { + as_expr_appeared.collect_as_expr(&peering_action.mp_peering.remote_as); + } as_expr_appeared.clean_up(); macro_rules! add_peerings {