rename read_all -> with_read_lock

This commit is contained in:
Chris Beck
2025-12-05 20:07:43 -07:00
parent 2085064d89
commit 3c88ba80a5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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<R, A>(&self, access: A) -> R
pub async fn with_read_lock<R, A>(&self, access: A) -> R
where
A: FnOnce(&HashMap<K, V>) -> R,
{
+1 -1
View File
@@ -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();
}