From 538e5efa2c723415db9ebc711e0382cd0ce12363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Mon, 29 Apr 2024 08:30:49 -0700 Subject: [PATCH] Stop using implicit dependency features Our optional dependencies were implicitly defining features of the same name, as that is how Cargo opted to do things. The behavior is weird and confusing and probably best avoided. With version 1.60 of Cargo, we can opt out by making actual features depend on said optional dependencies via dep: syntax [0]. With this change we do just that. [0] https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies --- Cargo.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f97a3e7..916a2f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,9 +34,8 @@ required-features = ["log", "unstable"] [features] default = ["log", "color"] -# TODO: use "dep:{tracing-subscriber,evn_logger}" once our MSRV is 1.60 or higher. -trace = ["tracing-subscriber", "test-log-macros/trace"] -log = ["env_logger", "test-log-macros/log", "tracing-subscriber?/tracing-log"] +trace = ["dep:tracing-subscriber", "test-log-macros/trace"] +log = ["dep:env_logger", "test-log-macros/log", "tracing-subscriber?/tracing-log"] color = ["env_logger?/auto-color", "tracing-subscriber?/ansi"] # Enable unstable features. These are generally exempt from any semantic # versioning guarantees.