mehcode / config-rs

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Apache License 2.0
2.57k stars 213 forks source link

Add test for overwriting key from env #370

Open matthiasbeyer opened 2 years ago

matthiasbeyer commented 2 years ago

To address #369

tekjar commented 2 years ago

That's fast! :). Thanks @matthiasbeyer

matthiasbeyer commented 2 years ago

Don't get too excited, this is just a test. I do not have a fix yet :laughing:

tekjar commented 2 years ago

Heheh just noticed this. Still, thanks! :)

tekjar commented 2 years ago

I would like to send a PR. Can you point me where overwrites happen in the code path?

matthiasbeyer commented 2 years ago

Okay, so the fix would be to not alias the field.

That's unfortunately the only fix I see right now because of the way config does deserialization. There's no fix that would make the code at hand work as expected.