Clippy updates, add Cargo.lock.

This commit is contained in:
Elizabeth Murray
2025-06-20 10:18:17 -07:00
parent c8a2612207
commit e1fa844da4
4 changed files with 16 additions and 7 deletions

4
Cargo.lock generated
View File

@@ -1251,6 +1251,7 @@ dependencies = [
"tonic 0.13.1",
"tower",
"uuid",
"workspace_hack",
]
[[package]]
@@ -5682,6 +5683,9 @@ checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690"
[[package]]
name = "request_tracker"
version = "0.0.0"
dependencies = [
"workspace_hack",
]
[[package]]
name = "reqwest"

View File

@@ -4,16 +4,17 @@ edition.workspace = true
license.workspace = true
[dependencies]
async-trait.workspace = true
bytes.workspace = true
tonic.workspace = true
hyper-util = "0.1.9"
futures.workspace = true
hyper-util.workspace = true
http.workspace = true
priority-queue = "2.3.1"
rand.workspace = true
tonic.workspace = true
tokio.workspace = true
tokio-util.workspace = true
tower.workspace = true
futures.workspace = true
uuid.workspace = true
priority-queue = "2.3.1"
rand.workspace = true
async-trait.workspace = true
workspace_hack.workspace = true

View File

@@ -6,7 +6,6 @@ use std::{
time::{Duration, Instant},
};
use tokio::sync::{Mutex, OwnedSemaphorePermit, Semaphore};
use uuid;
#[async_trait]
pub trait PooledClientFactory<T>: Send + Sync + 'static {
@@ -18,6 +17,7 @@ pub trait PooledClientFactory<T>: Send + Sync + 'static {
}
/// A pooled gRPC client with capacity tracking and error handling.
#[allow(dead_code)]
pub struct ClientCache<T> {
inner: Mutex<Inner<T>>,
@@ -39,6 +39,7 @@ pub struct ClientCache<T> {
client_semaphore: Arc<Semaphore>,
}
#[allow(dead_code)]
struct Inner<T> {
entries: HashMap<uuid::Uuid, CacheEntry<T>>,
pq: PriorityQueue<uuid::Uuid, usize>,
@@ -49,6 +50,7 @@ struct Inner<T> {
in_progress: usize,
}
#[allow(dead_code)]
struct CacheEntry<T> {
client: T,
active_consumers: usize,
@@ -57,6 +59,7 @@ struct CacheEntry<T> {
}
/// A client borrowed from the pool.
#[allow(dead_code)]
pub struct PooledClient<T> {
pub client: T,
pool: Arc<ClientCache<T>>,

View File

@@ -4,3 +4,4 @@ edition.workspace = true
license.workspace = true
[dependencies]
workspace_hack.workspace = true