Skip to content

Commit

Permalink
bgp: fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Renato Westphal <[email protected]>
  • Loading branch information
rwestphal committed Apr 8, 2024
1 parent 137aa83 commit c9f9957
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ nix = "0.26"
netlink-packet-core = "0.7"
netlink-packet-route = "0.17"
netlink-sys = "0.8"
num-derive = "0.3"
num-derive = "0.4"
num-traits = "0.2"
pickledb = "0.5"
prefix-trie = { version = "0.3", features = ["ipnetwork"] }
Expand Down Expand Up @@ -80,6 +80,7 @@ unsafe_code = "forbid"

[workspace.lints.clippy]
too_many_arguments = "allow"
manual_range_contains = "allow"

[profile.release]
lto = true # Enable link-time optimization for improved runtime performance
Expand Down
2 changes: 1 addition & 1 deletion holo-bgp/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ pub(crate) fn advertise_routes<A>(

// Enqueue export policy application.
let routes = routes
.into_iter()
.iter()
.filter(|(_, route)| neighbor_redistribute_filter(nbr, route))
.map(|(prefix, route)| ((*prefix).into(), route.policy_info()))
.collect::<Vec<_>>();
Expand Down
2 changes: 1 addition & 1 deletion holo-bgp/src/neighbor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ impl Neighbor {
rib::nexthop_untrack(
&mut table.nht,
prefix,
&adj_in_route,
adj_in_route,
ibus_tx,
);
}
Expand Down
4 changes: 2 additions & 2 deletions holo-bgp/src/northbound/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn load_callbacks() -> Callbacks<Instance> {
if instance.state.is_some() {
let iter = [AfiSafi::Ipv4Unicast, AfiSafi::Ipv6Unicast]
.into_iter()
.filter(|afi_safi| instance.config.afi_safi.contains_key(&afi_safi))
.filter(|afi_safi| instance.config.afi_safi.contains_key(afi_safi))
.map(ListEntry::GlobalAfiSafi);
Some(Box::new(iter))
} else {
Expand Down Expand Up @@ -815,7 +815,7 @@ fn load_callbacks() -> Callbacks<Instance> {
if instance.state.is_some() {
let iter = [AfiSafi::Ipv4Unicast, AfiSafi::Ipv6Unicast]
.into_iter()
.filter(|afi_safi| instance.config.afi_safi.contains_key(&afi_safi))
.filter(|afi_safi| instance.config.afi_safi.contains_key(afi_safi))
.map(ListEntry::Rib);
Some(Box::new(iter))
} else {
Expand Down

0 comments on commit c9f9957

Please sign in to comment.