mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-09-28 21:42:15 +00:00
Fix Event::all_fields doctest
This commit is contained in:
parent
90f03157f9
commit
e3276d8a0a
@ -255,11 +255,13 @@ impl<'event, 'meta: 'event> Event<'event, 'meta> {
|
||||
/// # #[macro_use]
|
||||
/// # extern crate tokio_trace;
|
||||
/// # use tokio_trace::Level;
|
||||
/// # fn main() {
|
||||
/// span!("parent 1", foo = 1, bar = 1).enter(|| {
|
||||
/// span!("parent 2", foo = 2, bar = 1).enter(|| {
|
||||
/// event!(Level::Info, { bar = 2 }, "my event");
|
||||
/// })
|
||||
/// })
|
||||
/// });
|
||||
/// # }
|
||||
/// ```
|
||||
/// If a `Subscriber` were to call `all_fields` on this event, it will
|
||||
/// receive an iterator with the values `("foo", 2)` and `("bar", 2)`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user