diff --git a/ic-agent/src/agent/http_transport/dynamic_routing/dynamic_route_provider.rs b/ic-agent/src/agent/http_transport/dynamic_routing/dynamic_route_provider.rs index ceb87e08..2e374ecb 100644 --- a/ic-agent/src/agent/http_transport/dynamic_routing/dynamic_route_provider.rs +++ b/ic-agent/src/agent/http_transport/dynamic_routing/dynamic_route_provider.rs @@ -251,7 +251,7 @@ impl Drop for DynamicRouteProvider { let tracker = self.tracker.clone(); // If no runtime is available do nothing. if let Ok(handle) = Handle::try_current() { - let _ = handle.spawn(async move { + handle.spawn(async move { tracker.wait().await; warn!("{DYNAMIC_ROUTE_PROVIDER}: stopped gracefully"); }); diff --git a/ic-agent/src/agent/http_transport/dynamic_routing/snapshot/latency_based_routing.rs b/ic-agent/src/agent/http_transport/dynamic_routing/snapshot/latency_based_routing.rs index cec2580c..c5c33cfd 100644 --- a/ic-agent/src/agent/http_transport/dynamic_routing/snapshot/latency_based_routing.rs +++ b/ic-agent/src/agent/http_transport/dynamic_routing/snapshot/latency_based_routing.rs @@ -99,7 +99,7 @@ impl RoutingSnapshot for LatencyRoutingSnapshot { .cloned() .collect(); let has_added_nodes = !nodes_added.is_empty(); - self.existing_nodes.extend(nodes_added.into_iter()); + self.existing_nodes.extend(nodes_added); // NOTE: newly added nodes will appear in the weighted_nodes later. // This happens after the first node health check round and a consequent update_node() invocation. for node in nodes_removed.into_iter() { diff --git a/ic-agent/src/agent/http_transport/dynamic_routing/test_utils.rs b/ic-agent/src/agent/http_transport/dynamic_routing/test_utils.rs index 8b411ed2..0fe5f14e 100644 --- a/ic-agent/src/agent/http_transport/dynamic_routing/test_utils.rs +++ b/ic-agent/src/agent/http_transport/dynamic_routing/test_utils.rs @@ -116,6 +116,6 @@ impl NodeHealthCheckerMock { pub fn overwrite_healthy_nodes(&self, healthy_nodes: Vec) { self.healthy_nodes - .store(Arc::new(HashSet::from_iter(healthy_nodes.into_iter()))); + .store(Arc::new(HashSet::from_iter(healthy_nodes))); } }