Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tracing-flame/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ of the `FlameLayer`, see the docs for [`FlushGuard`].
## Layer Setup

```rust
use std::{fs::File, io::BufWriter};
use tracing_flame::FlameLayer;
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.

let fmt_layer = fmt::Layer::default();
Expand Down