diff --git a/tracing-core/src/field.rs b/tracing-core/src/field.rs index 7e2c26b1d7..04b8e1b297 100644 --- a/tracing-core/src/field.rs +++ b/tracing-core/src/field.rs @@ -820,6 +820,7 @@ impl FieldSet { /// /// [`Identifier`]: super::callsite::Identifier /// [`Callsite`]: super::callsite::Callsite + #[inline] pub(crate) fn callsite(&self) -> callsite::Identifier { callsite::Identifier(self.callsite.0) } @@ -857,6 +858,7 @@ impl FieldSet { } /// Returns an iterator over the `Field`s in this `FieldSet`. + #[inline] pub fn iter(&self) -> Iter { let idxs = 0..self.len(); Iter { @@ -960,6 +962,7 @@ impl PartialEq for FieldSet { impl Iterator for Iter { type Item = Field; + #[inline] fn next(&mut self) -> Option { let i = self.idxs.next()?; Some(Field { diff --git a/tracing-core/src/metadata.rs b/tracing-core/src/metadata.rs index a154419a74..5e475c1294 100644 --- a/tracing-core/src/metadata.rs +++ b/tracing-core/src/metadata.rs @@ -273,6 +273,7 @@ impl<'a> Metadata<'a> { } /// Returns the names of the fields on the described span or event. + #[inline] pub fn fields(&self) -> &field::FieldSet { &self.fields } diff --git a/tracing/src/macros.rs b/tracing/src/macros.rs index f3968e5c11..a737348cbc 100644 --- a/tracing/src/macros.rs +++ b/tracing/src/macros.rs @@ -2311,7 +2311,7 @@ macro_rules! valueset { ) }; - // Remainder is unparseable, but exists --- must be format args! + // Remainder is unparsable, but exists --- must be format args! (@ { $(,)* $($out:expr),* }, $next:expr, $($rest:tt)+) => { $crate::valueset!(@ { (&$next, Some(&format_args!($($rest)+) as &dyn Value)), $($out),* }, $next, ) };