Skip to content

Commit

Permalink
Fix macro cases for trace_dbg! and dbg! (#2)
Browse files Browse the repository at this point in the history
Some of these macro cases were incorrect and it looks like naming was wrong for the `(target: $level:expr, ...` case.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
  • Loading branch information
kleimkuhler authored and hawkw committed Feb 2, 2019
1 parent 2fba14c commit 2ae0dee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tokio-trace-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 2ae0dee

Please sign in to comment.