diff --git a/Cargo.toml b/Cargo.toml index 3c197c5e..44e1fe91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } @@ -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 diff --git a/holo-bgp/src/events.rs b/holo-bgp/src/events.rs index c0b9d62a..27623e65 100644 --- a/holo-bgp/src/events.rs +++ b/holo-bgp/src/events.rs @@ -834,7 +834,7 @@ pub(crate) fn advertise_routes( // 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::>(); diff --git a/holo-bgp/src/neighbor.rs b/holo-bgp/src/neighbor.rs index d0d2a811..952c6285 100644 --- a/holo-bgp/src/neighbor.rs +++ b/holo-bgp/src/neighbor.rs @@ -933,7 +933,7 @@ impl Neighbor { rib::nexthop_untrack( &mut table.nht, prefix, - &adj_in_route, + adj_in_route, ibus_tx, ); } diff --git a/holo-bgp/src/northbound/state.rs b/holo-bgp/src/northbound/state.rs index 91c6aa49..82494128 100644 --- a/holo-bgp/src/northbound/state.rs +++ b/holo-bgp/src/northbound/state.rs @@ -75,7 +75,7 @@ fn load_callbacks() -> Callbacks { 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 { @@ -815,7 +815,7 @@ fn load_callbacks() -> Callbacks { 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 {