mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 09:47:50 +03:00
refactor(dev): move tracing to feature
This commit is contained in:
12
Cargo.toml
12
Cargo.toml
@@ -10,6 +10,9 @@ publish = false
|
|||||||
[profile.release]
|
[profile.release]
|
||||||
debug = true
|
debug = true
|
||||||
|
|
||||||
|
[features]
|
||||||
|
trace = ["tracing", "console-subscriber"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
providers = { path = "providers" }
|
providers = { path = "providers" }
|
||||||
actix-macros = { path = "actix-macros" }
|
actix-macros = { path = "actix-macros" }
|
||||||
@@ -69,9 +72,10 @@ base64 = "0.22.1"
|
|||||||
percent-encoding = "2.3.2"
|
percent-encoding = "2.3.2"
|
||||||
ed25519-dalek = "3.0.0-pre.0"
|
ed25519-dalek = "3.0.0-pre.0"
|
||||||
|
|
||||||
|
# development tracing
|
||||||
|
console-subscriber = { version = "0.4.1", optional = true }
|
||||||
|
tracing = { version = "0.1.41", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
providers = { path = "providers", features = ["test"] }
|
providers = { path = "providers", features = ["test"] }
|
||||||
actix-test = { path = "actix-test" }
|
actix-test = { path = "actix-test" }
|
||||||
|
|
||||||
console-subscriber = "0.4.1"
|
|
||||||
tracing = "0.1.41"
|
|
||||||
@@ -26,7 +26,7 @@ pub(crate) mod tests {
|
|||||||
|
|
||||||
STATE
|
STATE
|
||||||
.get_or_init(async || -> web::Data<AppState> {
|
.get_or_init(async || -> web::Data<AppState> {
|
||||||
#[cfg(all(test, tokio_unstable))]
|
#[cfg(feature = "trace")]
|
||||||
console_subscriber::init();
|
console_subscriber::init();
|
||||||
|
|
||||||
new_app_state(None).await.unwrap()
|
new_app_state(None).await.unwrap()
|
||||||
|
|||||||
Reference in New Issue
Block a user