Fix clippy warnings
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Alex Mikhalev 2020-08-18 21:08:45 -06:00
parent 2d0927cff2
commit 7aaab40e0b

View File

@ -91,6 +91,7 @@ impl SecRun {
matches!(self.state, RunState::Running{..}) matches!(self.state, RunState::Running{..})
} }
#[allow(dead_code)]
fn is_paused(&self) -> bool { fn is_paused(&self) -> bool {
matches!(self.state, RunState::Paused{..}) matches!(self.state, RunState::Paused{..})
} }
@ -152,7 +153,7 @@ impl SecRun {
start_time: Instant::now(), start_time: Instant::now(),
}; };
let ran_for = pause_time - start_time; let ran_for = pause_time - start_time;
self.duration = self.duration - ran_for; self.duration -= ran_for;
} }
Waiting | Finished | Cancelled | Running { .. } => { Waiting | Finished | Cancelled | Running { .. } => {
warn!( warn!(
@ -381,7 +382,6 @@ mod test {
model::Section, model::Section,
trace_listeners::{EventListener, Filters, SpanFilters, SpanListener}, trace_listeners::{EventListener, Filters, SpanFilters, SpanListener},
}; };
use tokio::time::{pause, resume};
use tracing_subscriber::prelude::*; use tracing_subscriber::prelude::*;
#[tokio::test] #[tokio::test]