Closed
Description
I tried this code:
for v in std::env::vars() {
println!("{:?}", v);
}
I expected to see this happen: a case-sensitive list of environment variables and values, matching the output of Environment.GetEnvironmentVariables
from C# and .NET and the output of Get-ChildItem Env:
from PowerShell.
It seems we should align the std::env::vars()
output to match the modern APIs for Windows that Microsoft provides.
Instead, this happened: std::env::vars()
returns all environment variable names in all uppercase.
Rust via std::env::vars()
:
SYSTEMDRIVE = C:
<snip>
C# via Environment.GetEnvironmentVariables
:
SystemDrive = C:
<snip>
Meta
rustc --version --verbose
:
>rustc --version --verbose
rustc 1.51.0-nightly (04caa632d 2021-01-30)
binary: rustc
commit-hash: 04caa632dd10c2bf64b69524c7f9c4c30a436877
commit-date: 2021-01-30
host: x86_64-pc-windows-msvc
release: 1.51.0-nightly
LLVM version: 11.0.1