diff options
-rw-r--r-- | CHANGELOG.md | 20 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/env.rs | 4 | ||||
-rw-r--r-- | tests/env.rs | 3 |
4 files changed, 24 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fc38aa..889a965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 0.9.0 - 2018-07-02 + - **Breaking Change:** Environment does not declare a separator by default. + ```rust + // 0.8.0 + Environment::with_prefix("APP") + + // 0.9.0 + Environment::with_prefix("APP").separator("_") + ``` + + - Add support for INI. [#72] + - Add support for newtype structs. [#71] + - Fix bug with array set by path. [#69] + - Update to nom 4. [#63] + +[#72]: https://github.com/mehcode/config-rs/pull/72 +[#71]: https://github.com/mehcode/config-rs/pull/71 +[#69]: https://github.com/mehcode/config-rs/pull/69 +[#63]: https://github.com/mehcode/config-rs/pull/63 + ## 0.8.0 - 2018-01-26 - Update lazy_static and yaml_rust @@ -25,7 +25,7 @@ ```toml [dependencies] -config = "0.8" +config = "0.9" ``` - `ini` - Adds support for reading INI files @@ -33,12 +33,12 @@ impl Environment { } } - pub fn prefix(&mut self, s: &str) -> &mut Self { + pub fn prefix(mut self, s: &str) -> Self { self.prefix = Some(s.into()); self } - pub fn separator(&mut self, s: &str) -> &mut Self { + pub fn separator(mut self, s: &str) -> Self { self.separator = Some(s.into()); self } diff --git a/tests/env.rs b/tests/env.rs index b204118..932d2fc 100644 --- a/tests/env.rs +++ b/tests/env.rs @@ -54,8 +54,7 @@ fn test_prefix_with_variant_forms_of_spelling() { fn test_separator_behavior() { env::set_var("C_B_A", "abc"); - let mut environment = Environment::with_prefix("C"); - environment.separator("_"); + let mut environment = Environment::with_prefix("C").separator("_"); assert!(environment.collect().unwrap().contains_key("b.a")); |