diff --git a/src/job_queue/queue.rs b/src/job_queue/queue.rs index ea7904e16..01ba6dee5 100644 --- a/src/job_queue/queue.rs +++ b/src/job_queue/queue.rs @@ -63,13 +63,13 @@ impl JobHandle { } /// messages that can be sent to job-queue inner task. -enum JobQueueMsg { +enum JobQueueMsg

{ AddJob(AddJobMsg

), Stop, } /// represents a msg to add a job to the queue. -struct AddJobMsg { +struct AddJobMsg

{ job: Box, result_tx: JobResultSender, cancel_tx: JobCancelSender, @@ -78,13 +78,13 @@ struct AddJobMsg { } /// implements a job queue that sends result of each job to a listener. -pub struct JobQueue { +pub struct JobQueue

{ tx: mpsc::UnboundedSender>, tracker: TaskTracker, refs: Arc<()>, } -impl std::fmt::Debug for JobQueue

{ +impl

std::fmt::Debug for JobQueue

{ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("JobQueue") .field("tx", &"mpsc::Sender") @@ -92,7 +92,7 @@ impl std::fmt::Debug for JobQueue

{ } } -impl Clone for JobQueue

{ +impl

Clone for JobQueue

{ fn clone(&self) -> Self { Self { tx: self.tx.clone(), @@ -102,7 +102,7 @@ impl Clone for JobQueue

{ } } -impl Drop for JobQueue

{ +impl

Drop for JobQueue

{ // since JobQueue has impl Clone there can be other instances. // we must only send the Stop message when dropping the last instance. // if upgrade of a Weak Arc fails then we are the last one.