From 4d6e6fc155bb263a04f7f6dfbb77933f5d2d0b2e Mon Sep 17 00:00:00 2001 From: Roberto Hidalgo Date: Mon, 8 May 2023 13:10:23 -0600 Subject: cargo fmt --- src/rpc/consul_services.rs | 5 ++++- src/rpc/system.rs | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src/rpc') diff --git a/src/rpc/consul_services.rs b/src/rpc/consul_services.rs index 461bb195..928c7691 100644 --- a/src/rpc/consul_services.rs +++ b/src/rpc/consul_services.rs @@ -67,7 +67,10 @@ impl ConsulServiceDiscovery { if let Some(token) = &config.consul_http_token { let mut headers = reqwest::header::HeaderMap::new(); - headers.insert("x-consul-token", reqwest::header::HeaderValue::from_str(&token)?); + headers.insert( + "x-consul-token", + reqwest::header::HeaderValue::from_str(&token)?, + ); builder = builder.default_headers(headers); } diff --git a/src/rpc/system.rs b/src/rpc/system.rs index b0fef6f2..287cd666 100644 --- a/src/rpc/system.rs +++ b/src/rpc/system.rs @@ -100,7 +100,11 @@ pub struct System { system_endpoint: Arc>, rpc_listen_addr: SocketAddr, - #[cfg(any(feature = "consul-discovery", feature = "consul-service-discovery", feature = "kubernetes-discovery"))] + #[cfg(any( + feature = "consul-discovery", + feature = "consul-service-discovery", + feature = "kubernetes-discovery" + ))] rpc_public_addr: Option, bootstrap_peers: Vec, @@ -386,7 +390,11 @@ impl System { replication_mode, replication_factor, rpc_listen_addr: config.rpc_bind_addr, - #[cfg(any(feature = "consul-discovery", feature = "consul-service-discovery", feature = "kubernetes-discovery"))] + #[cfg(any( + feature = "consul-discovery", + feature = "consul-service-discovery", + feature = "kubernetes-discovery" + ))] rpc_public_addr, bootstrap_peers: config.bootstrap_peers.clone(), #[cfg(feature = "consul-discovery")] @@ -601,7 +609,6 @@ impl System { } } - #[cfg(feature = "kubernetes-discovery")] async fn advertise_to_kubernetes(self: Arc) { let k = match &self.kubernetes_discovery { -- cgit v1.2.3