From 3c88ba80a5efd161c91724dc98151cd39e5ff9ff Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Fri, 5 Dec 2025 20:07:43 -0700 Subject: [PATCH] rename read_all -> with_read_lock --- signal-gateway/src/concurrent_map.rs | 2 +- signal-gateway/src/gateway/log_handler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/signal-gateway/src/concurrent_map.rs b/signal-gateway/src/concurrent_map.rs index 3764f73..2cebf3f 100644 --- a/signal-gateway/src/concurrent_map.rs +++ b/signal-gateway/src/concurrent_map.rs @@ -63,7 +63,7 @@ where /// /// Acquires a read lock and calls `access` with a reference to the underlying HashMap. /// The lock is held while `access` runs. - pub async fn read_all(&self, access: A) -> R + pub async fn with_read_lock(&self, access: A) -> R where A: FnOnce(&HashMap) -> R, { diff --git a/signal-gateway/src/gateway/log_handler.rs b/signal-gateway/src/gateway/log_handler.rs index b1b06bf..b4cdee6 100644 --- a/signal-gateway/src/gateway/log_handler.rs +++ b/signal-gateway/src/gateway/log_handler.rs @@ -113,7 +113,7 @@ impl LogHandler { /// If `filter` is provided, only origins matching the filter are included. pub async fn format_logs(&self, filter: Option<&str>) -> String { self.log_buffers - .read_all(|buffers| { + .with_read_lock(|buffers| { if buffers.is_empty() { return "No log sources registered yet".to_string(); }