allan2 / dotenvy

A well-maintained fork of the dotenv crate
MIT License
668 stars 42 forks source link

v0.16 new API #123

Closed allan2 closed 1 week ago

allan2 commented 1 week ago

This is a breaking fast-forward PR.

std::env::set_var is marked unsafe in the Rust 2024 edition. set_var is used in majority of functions in v0.15.

This PR introduces a non-modifying API for loading of environment variables. Modifying of the environment is also supported with improved ergonomics limiting the use of unsafe.

More docs and tests have to be added. Feedback is welcome.

Further reading:

Resolves #14, resolves #25, resolves #39, resolves #68, resolves #105, resolves #106, resolves #48 Progresses #112

aidenfarley commented 1 week ago

Would adding a rust-toolchain.toml file with the nightly toolchain specified be beneficial to allow tests to compile?

allan2 commented 1 week ago

No, I will revert the edition. More tests and docs still need to be added.

github-actions[bot] commented 1 week ago

Code Coverage