mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 15:24:47 +00:00
tracing: remove duplicated event macro pattern (#1352)
The following two patterns for the `event!()` are identical to each other, and the second one swapped the order of `$lvl` and `parent: $parent` which I don't think is correct. ```rust (parent: $parent:expr, $lvl:expr, { $($fields:tt)* }, $($arg:tt)+ ) => ( $crate::event!( target: module_path!(), parent: $parent, $lvl, { message = format_args!($($arg)+), $($fields)* } ) ); (parent: $parent:expr, $lvl:expr, { $($fields:tt)* }, $($arg:tt)+ ) => ( $crate::event!( target: module_path!(), $lvl, parent: $parent, { message = format_args!($($arg)+), $($fields)* } ) ); ``` I found the duplicated via [macro_railraod](https://github.com/lukaslueg/macro_railroad). Here is the diagram: 
This commit is contained in:
parent
07af5f8fd8
commit
3d65a48526
@ -684,14 +684,6 @@ macro_rules! event {
|
||||
{ message = format_args!($($arg)+), $($fields)* }
|
||||
)
|
||||
);
|
||||
(parent: $parent:expr, $lvl:expr, { $($fields:tt)* }, $($arg:tt)+ ) => (
|
||||
$crate::event!(
|
||||
target: module_path!(),
|
||||
$lvl,
|
||||
parent: $parent,
|
||||
{ message = format_args!($($arg)+), $($fields)* }
|
||||
)
|
||||
);
|
||||
(parent: $parent:expr, $lvl:expr, $($k:ident).+ = $($field:tt)*) => (
|
||||
$crate::event!(
|
||||
target: module_path!(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user