libcnb.rs icon indicating copy to clipboard operation
libcnb.rs copied to clipboard

Rename `libcnb::Env::new()` to `libcnb::Env::empty()`

Open schneems opened this issue 2 years ago • 2 comments

It's unclear that Env::new() doesn't inherit env from the current process. It would be clearer if it was Env::empty() instead.

schneems avatar Nov 08 '22 02:11 schneems

Unsure if I agree with this one given:

  • Docs already state: Creates an empty Env struct.
  • Personally, I wouldn't have expected it side-effecting and grabbing the current environment
  • It's a breaking change

How strongly are you feeling about this @schneems?

Malax avatar Mar 20 '23 10:03 Malax

@schneems Thoughts on the above?

The docs are at: https://docs.rs/libcnb/latest/libcnb/struct.Env.html

edmorley avatar Oct 18 '23 22:10 edmorley