Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed Jul 20, 2023
1 parent 4a1d0ac commit 60f574f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ impl TaskQueue {
pub fn len(&self) -> usize {
(self.metrics.enqueued_tasks.value() - self.metrics.dequeued_tasks.value()) as usize
}

/// Returns `true` if this queue is empty.
pub fn is_empty(&self) -> bool {
self.len() == 0
}
}
impl Default for TaskQueue {
fn default() -> Self {
Expand Down

0 comments on commit 60f574f

Please sign in to comment.