Skip to content

Commit

Permalink
Replace (abandoned) dotenv crate with fork dotenvy
Browse files Browse the repository at this point in the history
Signed-off-by: flamion <contact@flamion.dev>
  • Loading branch information
flamion committed Jun 12, 2023
1 parent 9c2379f commit 41879ea
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
64 changes: 32 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ chrono = "0.4.26"
thiserror = "1.0.38"

lazy_static = "1.4.0"
dotenv = "0.15.0"
dotenvy = "0.15.7"

[dependencies.sqlx]
version = "0.6.3"
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum ShortyError {
#[error(transparent)]
Database(#[from] sqlx::Error),
#[error(transparent)]
Dotenv(#[from] dotenv::Error),
Dotenvy(#[from] dotenvy::Error),
}

impl ResponseError for ShortyError {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ lazy_static! {
#[tokio::main]
async fn main() -> Result<(), ShortyError> {
if Path::new(".env").exists() {
dotenv::dotenv()?;
dotenvy::dotenv()?;
}

let env_filter = EnvFilter::from_default_env()
Expand Down

0 comments on commit 41879ea

Please sign in to comment.