Skip to content

Commit

Permalink
remove unnecessary ok on dotenv result (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoas authored Nov 18, 2022
1 parent 24a4dca commit 8dacb5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use dotenvy::dotenv;
use std::env;

fn main() {
dotenv().ok();
// load environment variables from .env file
dotenv().expect(".env file not found");

for (key, value) in env::vars() {
println!("{key}: {value}");
Expand Down
3 changes: 2 additions & 1 deletion dotenv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use dotenvy::dotenv;
use std::env;

fn main() {
dotenv().ok();
// load environment variables from .env file
dotenv().expect(".env file not found");

for (key, value) in env::vars() {
println!("{key}: {value}");
Expand Down

0 comments on commit 8dacb5c

Please sign in to comment.