Skip to content

Conversation

@Tamschi
Copy link
Contributor

@Tamschi Tamschi commented Jan 14, 2022

Motivation

While writing a component tracing example, I noticed that these imports were giving me unused_imports warnings. It seems they aren't necessary anymore.

Solution

I removed the unused imports in this example.

@Tamschi Tamschi requested review from a team and yaahc as code owners January 14, 2022 16:08
use tracing_subscriber::{registry::Registry, prelude::*, fmt};
use tracing_subscriber::{prelude::*, fmt};

fn setup_global_subscriber() -> impl Drop {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's incidental, but this example would have been easier for me to understand without type annotations if there was a #[must_use] on this function (since impl Drop appears to cause that warning to not propagate here) and _guard was flush_guard instead.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@hawkw hawkw enabled auto-merge (squash) February 3, 2022 17:46
@hawkw hawkw merged commit 7e3f64f into tokio-rs:master Feb 3, 2022
hawkw pushed a commit that referenced this pull request Feb 3, 2022
## Motivation

While writing a component tracing example, I noticed that these imports
were giving me `unused_imports` warnings. It seems they aren't necessary
anymore.

## Solution

I removed the unused imports in this example.
hawkw pushed a commit that referenced this pull request Feb 3, 2022
## Motivation

While writing a component tracing example, I noticed that these imports
were giving me `unused_imports` warnings. It seems they aren't necessary
anymore.

## Solution

I removed the unused imports in this example.
hawkw pushed a commit that referenced this pull request Feb 3, 2022
## Motivation

While writing a component tracing example, I noticed that these imports
were giving me `unused_imports` warnings. It seems they aren't necessary
anymore.

## Solution

I removed the unused imports in this example.
hawkw pushed a commit that referenced this pull request Feb 3, 2022
## Motivation

While writing a component tracing example, I noticed that these imports
were giving me `unused_imports` warnings. It seems they aren't necessary
anymore.

## Solution

I removed the unused imports in this example.
hawkw pushed a commit that referenced this pull request Feb 4, 2022
## Motivation

While writing a component tracing example, I noticed that these imports
were giving me `unused_imports` warnings. It seems they aren't necessary
anymore.

## Solution

I removed the unused imports in this example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants