Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macro cases for trace_dbg! and dbg! #2

Merged
merged 1 commit into from
Feb 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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