As described in the documentation, std::env::remove_var will become unsafe in a future version of Rust.
Even today the use of std::env::remove_var is unsound in multithreaded programs and can cause UB. In addition to that, env manipulation from non-Rust libs (libssytemd) can cause UB in Rust.
See the rust-lang/rust#27970 for more information.
I think this is a problem for rust-systemd, because threads can be accessing the environment, while rust-systemd calls remove_var or calls into libsystemd which changes the env.
What do you think?
Thanks for your opinions :)