From 7aaab40e0b9a18a7afa7cf82238739b0b9fa6f6b Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Tue, 18 Aug 2020 21:08:45 -0600 Subject: [PATCH] Fix clippy warnings --- src/section_runner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/section_runner.rs b/src/section_runner.rs index caca6f3..0813e70 100644 --- a/src/section_runner.rs +++ b/src/section_runner.rs @@ -91,6 +91,7 @@ impl SecRun { matches!(self.state, RunState::Running{..}) } + #[allow(dead_code)] fn is_paused(&self) -> bool { matches!(self.state, RunState::Paused{..}) } @@ -152,7 +153,7 @@ impl SecRun { start_time: Instant::now(), }; let ran_for = pause_time - start_time; - self.duration = self.duration - ran_for; + self.duration -= ran_for; } Waiting | Finished | Cancelled | Running { .. } => { warn!( @@ -381,7 +382,6 @@ mod test { model::Section, trace_listeners::{EventListener, Filters, SpanFilters, SpanListener}, }; - use tokio::time::{pause, resume}; use tracing_subscriber::prelude::*; #[tokio::test]