From e131a4ca1da4a3108b71402598d27bb0aebcfee8 Mon Sep 17 00:00:00 2001 From: Allan <6740989+allan2@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:55:56 -0400 Subject: [PATCH] Use `std::error` instead of `core::error` This is to pass CI. It also reverts an unwanted change to the README.md. --- dotenv/README.md | 16 ---------------- dotenv/src/bin/dotenvy.rs | 3 +-- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dotenv/README.md b/dotenv/README.md index d3b24f0f..2b875a84 100644 --- a/dotenv/README.md +++ b/dotenv/README.md @@ -36,22 +36,6 @@ fn main() { } ``` -Async: -```rs -use dotenvy::dotenv; -use std::env; - -fn main() { - // load environment variables from .env file - dotenv().expect(".env file not found"); - - for (key, value) in env::vars() { - println!("{key}: {value}"); - } -} -``` - - ### Loading at compile time The `dotenv!` macro provided by `dotenvy_macro` crate can be used. diff --git a/dotenv/src/bin/dotenvy.rs b/dotenv/src/bin/dotenvy.rs index 93584c69..c07006d5 100644 --- a/dotenv/src/bin/dotenvy.rs +++ b/dotenv/src/bin/dotenvy.rs @@ -10,8 +10,7 @@ //! //! will output `bar`. use clap::{Parser, Subcommand}; -use core::error; -use std::{os::unix::process::CommandExt, path::PathBuf, process}; +use std::{error, os::unix::process::CommandExt, path::PathBuf, process}; macro_rules! die { ($fmt:expr) => ({