Skip to content

Commit

Permalink
Change env check to be more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
tascord committed Apr 8, 2024
1 parent e4e4d4e commit 99c206a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub mod test {
static CLIENT: Lazy<Client> = Lazy::new(|| {

// Load .env file if DEVID and KEY are not set
if !std::env::vars().any(|(k, _)| k == "DEVID" || k == "KEY") {
dotenv().ok().expect("Failed to find .env");
if std::env::var("DEVID").is_err() || std::env::var("KEY").is_err() {
dotenv().ok();
}

Client::new(
Expand Down

0 comments on commit 99c206a

Please sign in to comment.