Skip to content

Commit

Permalink
bgp: small code simplification
Browse files Browse the repository at this point in the history
Signed-off-by: Renato Westphal <[email protected]>
  • Loading branch information
rwestphal committed Feb 21, 2024
1 parent 20589ab commit 9f7094e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions holo-bgp/src/neighbor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,8 @@ impl Neighbor {
.prefixes
.iter()
.filter_map(|(prefix, dest)| {
dest.local.as_ref().map(|route| (prefix, &route.0))
dest.local.as_ref().map(|route| (*prefix, route.0.clone()))
})
.map(|(prefix, route)| (*prefix, route.clone()))
.collect::<Vec<_>>();

// Advertise the best routes.
Expand Down

0 comments on commit 9f7094e

Please sign in to comment.