Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Replace dotenv with dotenvy #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ members = ["sqlxmq_macros", "sqlxmq_stress"]
[dependencies]
sqlx = { version = "0.6.0", features = ["postgres", "chrono", "uuid"] }
tokio = { version = "1.8.3", features = ["full"] }
dotenv = "0.15.0"
dotenvy = "0.15.3"
chrono = "0.4.19"
uuid = { version = "1.1.2", features = ["v4"] }
log = "0.4.14"
Expand All @@ -32,7 +32,7 @@ runtime-tokio-native-tls = ["sqlx/runtime-tokio-native-tls"]
runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls"]

[dev-dependencies]
dotenv = "0.15.0"
dotenvy = "0.15.3"
pretty_env_logger = "0.4.0"
futures = "0.3.13"
tokio = { version = "1", features = ["full"] }
2 changes: 1 addition & 1 deletion examples/graceful-shutdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use tokio::time;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
dotenv::dotenv().ok();
dotenvy::dotenv().ok();
let db = sqlx::PgPool::connect(&std::env::var("DATABASE_URL").unwrap()).await?;

sleep.builder().set_json(&5u64)?.spawn(&db).await?;
Expand Down
2 changes: 1 addition & 1 deletion sqlxmq_stress/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2018"
[dependencies]
sqlxmq = { path = ".." }
tokio = { version = "1.4.0", features = ["full"] }
dotenv = "0.15.0"
dotenvy = "0.15.3"
sqlx = "0.6.0"
serde = "1.0.125"
lazy_static = "1.4.0"
Expand Down
2 changes: 1 addition & 1 deletion sqlxmq_stress/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async fn schedule_tasks(num_jobs: usize, interval: Duration, pool: Pool<Postgres

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let _ = dotenv::dotenv();
let _ = dotenvy::dotenv();

let pool = Pool::connect(&env::var("DATABASE_URL")?).await?;

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ mod tests {

let guard = TEST_MUTEX.lock().await;

let _ = dotenv::dotenv();
let _ = dotenvy::dotenv();

INIT_LOGGER.call_once(pretty_env_logger::init);

Expand Down