Skip to content

Commit 90f4482

Browse files
committed
style(cli/log): use precise capturing when necessary
See <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html> for more details.
1 parent c99abdd commit 90f4482

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cli/log.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{process::Process, utils::notify::NotificationLevel};
2020
pub fn tracing_subscriber(
2121
process: &Process,
2222
) -> (
23-
impl tracing::Subscriber,
23+
impl tracing::Subscriber + use<>,
2424
reload::Handle<EnvFilter, Registry>,
2525
) {
2626
#[cfg(feature = "otel")]
@@ -45,7 +45,7 @@ pub fn tracing_subscriber(
4545
/// When the `RUSTUP_LOG` environment variable is present, a standard [`tracing_subscriber`]
4646
/// formatter will be used according to the filtering directives set in its value.
4747
/// Otherwise, this logger will use [`EventFormatter`] to mimic "classic" Rustup `stderr` output.
48-
fn console_logger<S>(process: &Process) -> (impl Layer<S>, reload::Handle<EnvFilter, S>)
48+
fn console_logger<S>(process: &Process) -> (impl Layer<S> + use<S>, reload::Handle<EnvFilter, S>)
4949
where
5050
S: Subscriber + for<'span> LookupSpan<'span>,
5151
{
@@ -129,7 +129,7 @@ impl NotificationLevel {
129129
/// A [`tracing::Subscriber`] [`Layer`][`tracing_subscriber::Layer`] that corresponds to Rustup's
130130
/// optional `opentelemetry` (a.k.a. `otel`) feature.
131131
#[cfg(feature = "otel")]
132-
fn telemetry<S>(process: &Process) -> impl Layer<S>
132+
fn telemetry<S>(process: &Process) -> impl Layer<S> + use<S>
133133
where
134134
S: Subscriber + for<'span> LookupSpan<'span>,
135135
{

0 commit comments

Comments
 (0)