From 261a9ae0930915ab150da277583fb44656ff4778 Mon Sep 17 00:00:00 2001 From: Elizabeth Murray Date: Fri, 20 Jun 2025 08:28:40 -0700 Subject: [PATCH] Run cargo fmt. --- .../client_cache/src/lib.rs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pageserver/communicator_pools/client_cache/src/lib.rs b/pageserver/communicator_pools/client_cache/src/lib.rs index 904e71453e..e237932f05 100644 --- a/pageserver/communicator_pools/client_cache/src/lib.rs +++ b/pageserver/communicator_pools/client_cache/src/lib.rs @@ -1,23 +1,22 @@ +use async_trait::async_trait; +use priority_queue::PriorityQueue; use std::{ collections::HashMap, sync::Arc, time::{Duration, Instant}, }; -use priority_queue::PriorityQueue; -use tokio::{ - sync::{Mutex, OwnedSemaphorePermit, Semaphore}, -}; +use tokio::sync::{Mutex, OwnedSemaphorePermit, Semaphore}; use uuid; -use async_trait::async_trait; - #[async_trait] pub trait PooledClientFactory: Send + Sync + 'static { /// Create a new pooled item. - async fn create(&self, connect_timeout: Duration) -> Result, tokio::time::error::Elapsed>; + async fn create( + &self, + connect_timeout: Duration, + ) -> Result, tokio::time::error::Elapsed>; } - /// A pooled gRPC client with capacity tracking and error handling. pub struct ClientCache { inner: Mutex>, @@ -57,7 +56,6 @@ struct CacheEntry { last_used: Instant, } - /// A client borrowed from the pool. pub struct PooledClient { pub client: T, @@ -103,6 +101,3 @@ impl PooledClient { return self.client.clone(); } } - - -