From e9354383d9dcd5d7fc9fd8539b3ef37b3e6a8645 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Mon, 2 Jul 2018 15:41:14 -0700 Subject: Update readme/changelog for 0.9 --- CHANGELOG.md | 20 ++++++++++++++++++++ README.md | 2 +- src/env.rs | 4 ++-- 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 diff --git a/README.md b/README.md index b77daa9..31a9676 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ ```toml [dependencies] -config = "0.8" +config = "0.9" ``` - `ini` - Adds support for reading INI files diff --git a/src/env.rs b/src/env.rs index 5beead5..51e91a9 100644 --- a/src/env.rs +++ b/src/env.rs @@ -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")); -- cgit v1.2.3