From 3f3bd6ff4c4b260aa1ed7806ab372be7e710347b Mon Sep 17 00:00:00 2001 From: Nugine Date: Mon, 16 Jan 2023 19:22:15 +0800 Subject: [PATCH] chore(deps): replace dotenv with dotenvy --- Cargo.toml | 3 +-- benches/layers.rs | 2 +- benches/ops/utils.rs | 2 +- examples/tracing_layer.rs | 2 +- tests/behavior/utils.rs | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3097c41e1b60..bec90af9f6ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -114,7 +114,6 @@ base64 = "0.21" bb8 = { version = "0.8", optional = true } bincode = { version = "2.0.0-rc.2", features = ["serde"] } bytes = "1" -dotenv = { version = "0.15", optional = true } flagset = "0.4" futures = { version = "0.3", features = ["alloc"] } hdrs = { version = "0.2", optional = true, features = ["async_file"] } @@ -156,7 +155,7 @@ uuid = { version = "1", features = ["serde", "v4"] } [dev-dependencies] cfg-if = "1" criterion = { version = "0.4", features = ["async", "async_tokio"] } -dotenv = "0.15" +dotenvy = "0.15" env_logger = "0.10" itertools = "0.10" opentelemetry = { version = "0.17", default-features = false, features = [ diff --git a/benches/layers.rs b/benches/layers.rs index d9231879061b..9ead80267a92 100644 --- a/benches/layers.rs +++ b/benches/layers.rs @@ -50,7 +50,7 @@ pub static TOKIO: Lazy = fn bench_tracing_layer(c: &mut Criterion) { let mut group = c.benchmark_group("tracing_layers"); - let _ = dotenv::dotenv(); + let _ = dotenvy::dotenv(); let op = Operator::from_env(Scheme::S3).expect("init operator must succeed"); let layered_op = Operator::from_env(Scheme::S3) .expect("init operator must succeed") diff --git a/benches/ops/utils.rs b/benches/ops/utils.rs index b6272b1f56c6..bb2858617e53 100644 --- a/benches/ops/utils.rs +++ b/benches/ops/utils.rs @@ -39,7 +39,7 @@ async fn service(scheme: Scheme) -> Option { } pub fn services() -> Vec<(&'static str, Option)> { - let _ = dotenv::dotenv(); + let _ = dotenvy::dotenv(); TOKIO.block_on(async { vec![ diff --git a/examples/tracing_layer.rs b/examples/tracing_layer.rs index f73bb41f18ad..8f6d0d5a7764 100644 --- a/examples/tracing_layer.rs +++ b/examples/tracing_layer.rs @@ -39,7 +39,7 @@ fn main() -> Result<(), Box> { let root = span!(tracing::Level::INFO, "app_start", work_units = 2); let _enter = root.enter(); - let _ = dotenv::dotenv(); + let _ = dotenvy::dotenv(); let op = Operator::from_env(Scheme::S3) .expect("init operator must succeed") .layer(TracingLayer); diff --git a/tests/behavior/utils.rs b/tests/behavior/utils.rs index 4cd20d832453..b2a867e5304f 100644 --- a/tests/behavior/utils.rs +++ b/tests/behavior/utils.rs @@ -34,7 +34,7 @@ use sha2::Sha256; /// - Else, returns a `None` to represent no valid config for operator. pub fn init_service(scheme: Scheme, random_root: bool) -> Option { let _ = env_logger::builder().is_test(true).try_init(); - let _ = dotenv::dotenv(); + let _ = dotenvy::dotenv(); let prefix = format!("opendal_{}_", scheme);