dotenv-rs / dotenv

Library to help supply environment variables in testing and development
MIT License
566 stars 45 forks source link

Un-deprecate `from_path_iter` or make `Iter` public #43

Closed askoretskiy closed 4 years ago

askoretskiy commented 4 years ago

For my project I need a function that reads ENV file and do not change the current process environment.

I found out dotenv::from_path_iter is doing exactly what is needed. Unfortunately it is marked as deprecated and it is recommended to use from_path + vars.

The problem is that from_path updates the environment but I need just to read it, I would modify the env myself.

I could have used Ok(Iter::new(File::open(path).map_err(Error::Io)?)) but Iter struct is private.

Plecra commented 4 years ago

Fyi, the deprecation warning has been removed

askoretskiy commented 4 years ago

Thank you @Plecra . Any plans for release?