From 4cee4bc18ff6b0159c00d48622181db145938601 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 11 Apr 2023 01:33:36 +0800 Subject: [PATCH] Fix potential clippy issue of unused variable for `start_timer` and `add_to_trace` macros for no `print-trace` feature. (#45) --- src/perf_trace.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/perf_trace.rs b/src/perf_trace.rs index cfda3f0..8766cb5 100644 --- a/src/perf_trace.rs +++ b/src/perf_trace.rs @@ -183,14 +183,16 @@ mod inner { #[macro_export] macro_rules! start_timer { - ($msg:expr) => { + ($msg:expr) => {{ + let _ = $msg; $crate::perf_trace::TimerInfo - }; + }}; } #[macro_export] macro_rules! add_to_trace { ($title:expr, $msg:expr) => { let _ = $msg; + let _ = $title; }; }