From 0c739c79a85e11333b486b6ad1b17176db78189b Mon Sep 17 00:00:00 2001 From: Kevin Leimkuhler Date: Fri, 1 Feb 2019 14:56:10 -0800 Subject: [PATCH] Fix macro cases for `trace_dbg!` and `dbg!` Signed-off-by: Kevin Leimkuhler --- tokio-trace-macros/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tokio-trace-macros/src/lib.rs b/tokio-trace-macros/src/lib.rs index 592d16211d..f0670430d2 100644 --- a/tokio-trace-macros/src/lib.rs +++ b/tokio-trace-macros/src/lib.rs @@ -4,13 +4,13 @@ extern crate tokio_trace; /// Alias of `dbg!` for avoiding conflicts with the `std::dbg!` macro. #[macro_export(local_inner_macros)] macro_rules! trace_dbg { - (level: $level:expr, $ex:expr) => { - dbg!(level: $level, $ex) + (target: $target:expr, level: $level:expr, $ex:expr) => { + dbg!(target: $target, level: $level, $ex) }; (level: $level:expr, $ex:expr) => { dbg!(target: module_path!(), level: $level, $ex) }; - (target: $level:expr, $ex:expr) => { + (target: $target:expr, $ex:expr) => { dbg!(target: $target, level: tokio_trace::Level::DEBUG, $ex) }; ($ex:expr) => { @@ -57,7 +57,7 @@ macro_rules! dbg { (level: $level:expr, $ex:expr) => { dbg!(target: module_path!(), level: $level, $ex) }; - (target: $level:expr, $ex:expr) => { + (target: $target:expr, $ex:expr) => { dbg!(target: $target, level: tokio_trace::Level::DEBUG, $ex) }; ($ex:expr) => {