From 97a5e35fb80b46fc82e58cf4becbe427f53b6b50 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Thu, 29 Aug 2024 17:19:22 +0200 Subject: [PATCH] clarify that queue length need not be precise --- src/indexer/player.rs | 2 +- src/indexer/player_queue.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/indexer/player.rs b/src/indexer/player.rs index a9bf187b..e90704b1 100644 --- a/src/indexer/player.rs +++ b/src/indexer/player.rs @@ -68,7 +68,7 @@ impl PlayerIndexerStub { } pub fn num_indexing(&self) -> usize { - self.queue.len() + self.queue.estimate_len() } pub fn preceding_tickets(&self, ticket: &Ticket) -> u64 { diff --git a/src/indexer/player_queue.rs b/src/indexer/player_queue.rs index d990575f..e26faf4f 100644 --- a/src/indexer/player_queue.rs +++ b/src/indexer/player_queue.rs @@ -22,7 +22,7 @@ impl Queue { } } - pub fn len(&self) -> usize { + pub fn estimate_len(&self) -> usize { self.state.lock().unwrap().len() }