From 1711560113e0ea82a86680916e0653f1a7a20d5a Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Thu, 5 Oct 2023 18:23:11 -0400 Subject: [PATCH] Drop a reference to the tracing crate This is otherwise not referenced. Remove the need to add a dependency on `tracing` from the README. --- CHANGELOG.md | 1 + README.md | 1 - src/lib.rs | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 067866e..3dde2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Unreleased `test_case` crate), that may not have been parsable in the past - Removed generated `test_impl` function, which could have "leaked" into test cases (#28) +- Eliminated dependency on `tracing` crate 0.2.12 diff --git a/README.md b/README.md index e3ce034..f28b30d 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,6 @@ enabling the `log` or `trace` feature, respectively). E.g., ```toml [dev-dependencies] env_logger = "*" -tracing = {version = "0.1", default-features = false} tracing-subscriber = {version = "0.3", default-features = false, features = ["env-filter", "fmt"]} ``` diff --git a/src/lib.rs b/src/lib.rs index 4080a31..548683c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -164,12 +164,11 @@ fn expand_tracing_init() -> Tokens { } }; - let subscriber = ::tracing_subscriber::FmtSubscriber::builder() + let _ = ::tracing_subscriber::FmtSubscriber::builder() .with_env_filter(::tracing_subscriber::EnvFilter::from_default_env()) .with_span_events(__internal_event_filter) .with_test_writer() - .finish(); - let _ = ::tracing::subscriber::set_global_default(subscriber); + .try_init(); } } #[cfg(not(feature = "trace"))]