mehcode / config-rs

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

Incorrect description of separator usage in Environment::with_prefix() #539

Open Zoufar opened 7 months ago

Zoufar commented 7 months ago

Description of pub fn withprefix(s: &str) reads following: "A prefix with a separator of is tested to be present on each key before its considered to be part of the source environment."

In fact, proper formulation could be: "A prefix with a separator set by pub fn prefix_separator() OR (if no prefixseparator set) set by pub fn separator() OR (if none of previous) of "" is tested to be present on each key before its considered to be part of the source environment."

Also, there may be added following piece of text to the description of pub fn separator(mut self, s: &str): "In case of prefix separator not being explicitly set by pub fn prefix_separator(), this character sequence will be used also as prefix separator."