mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
trace-core: API polish (#962)
This branch makes a handful of `tokio-trace-core` API improvements, mostly around naming. In particular: * Rename `dispatcher::with` to `dispatcher::get_default` * Rename `Event::observe` to `Event::dispatch` * Make `field::ValidLen` trait private Closes #948 Closes #960 Signed-off-by: Eliza Weisman <[email protected]>
This commit is contained in:
@@ -272,7 +272,7 @@ impl<'a> Span<'a> {
|
||||
|
||||
#[inline(always)]
|
||||
fn make(meta: &'a Metadata<'a>, new_span: Attributes) -> Span<'a> {
|
||||
let inner = dispatcher::with(move |dispatch| {
|
||||
let inner = dispatcher::get_default(move |dispatch| {
|
||||
let id = dispatch.new_span(&new_span);
|
||||
Some(Inner::new(id, dispatch, meta))
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user