Code coverage issues
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 1m59s
Cargo CI / Lint (pull_request) Successful in 1m7s

This commit is contained in:
Wojciech Kozlowski 2024-09-21 22:58:35 +02:00
parent f48db09300
commit 326cdde32e

View File

@ -298,13 +298,22 @@ impl JobQueue {
.or_else(|| self.background_queue.pop_front()) .or_else(|| self.background_queue.pop_front())
} }
#[cfg(test)]
fn push_back(&mut self, job: Job) { fn push_back(&mut self, job: Job) {
match job.priority { match job.priority {
#[cfg(test)]
JobPriority::Foreground => self.foreground_queue.push_back(job.instance), JobPriority::Foreground => self.foreground_queue.push_back(job.instance),
JobPriority::Background => self.background_queue.push_back(job.instance), JobPriority::Background => self.background_queue.push_back(job.instance),
} }
} }
// GRCOV_EXCL_START
#[cfg(not(test))]
fn push_back(&mut self, job: Job) {
match job.priority {
JobPriority::Background => self.background_queue.push_back(job.instance),
}
}
// GRCOV_EXCL_STOP
} }
#[cfg(test)] #[cfg(test)]