diff --git a/tracing-error/src/layer.rs b/tracing-error/src/layer.rs index e804c5e8..59f5e3e1 100644 --- a/tracing-error/src/layer.rs +++ b/tracing-error/src/layer.rs @@ -103,9 +103,9 @@ where } impl WithContext { - pub(crate) fn with_context<'a>( + pub(crate) fn with_context( &self, - dispatch: &'a Dispatch, + dispatch: &Dispatch, id: &span::Id, mut f: impl FnMut(&'static Metadata<'static>, &str) -> bool, ) { diff --git a/tracing-opentelemetry/src/layer.rs b/tracing-opentelemetry/src/layer.rs index 7624b613..dc8a1c60 100644 --- a/tracing-opentelemetry/src/layer.rs +++ b/tracing-opentelemetry/src/layer.rs @@ -83,9 +83,9 @@ pub(crate) struct WithContext( impl WithContext { // This function allows a function to be called in the context of the // "remembered" subscriber. - pub(crate) fn with_context<'a>( + pub(crate) fn with_context( &self, - dispatch: &'a tracing::Dispatch, + dispatch: &tracing::Dispatch, id: &span::Id, mut f: impl FnMut(&mut OtelData, &dyn PreSampledTracer), ) {