summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2021-03-31Simplify implementationMatthias Beyer
This patch simplifies the Source::collect_to() default implementation by making use of the ? operator as well as the std::iter API. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-28Rename get_str() → get_string() to match returned typeCaleb Maclennan
2021-03-26Merge pull request #184 from matthiasbeyer/config-only-default-constructorMatthias Beyer
Remove Config::new()
2021-03-26Fix custom separator for group prefixesLyuben Todorov
2021-03-26Remove Config::new()Matthias Beyer
Removes the ::new() constructor, because Config::default() does the same. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-19Add doc: Config::set_default()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-19Add doc: Config:set()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-18port to rust-ini 0.16Fabio Valentini
2021-03-17Merge pull request #172 from matthiasbeyer/add-setterMatthias Beyer
Add setter for setting config value once
2021-03-17Add a Config::set_once() function to set a value once (and let ↵Matthias Beyer
Config::merge() overwrite it later Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-17Add Config::with_merged()Matthias Beyer
This patch adds a builder-pattern version of Config::merge(), which can be used for method-chain-building Config objects. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-16Fix clippy: Use is_empty() instead of comparing to empty stringMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-03-16Clippy: Remove manual implementation of mapMatthias Beyer
Because clippy complains on nightly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-10-01Run cargo-fmtMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-14General upgrade for clippy fix and remove of deprecated methods for errorsFederico Pasqua
2019-12-07Merge pull request #119 from vorner/universal-map-keysRyan Leckey
Allow arbitrary types of map keys
2019-12-07Remove automatic lowercaseRyan Leckey
2019-08-22Allow arbitrary types of map keysMichal 'vorner' Vaner
Of particular interest are maps that have numbers or enums as keys. Closes #74.
2019-06-27port to nom 5Geoffroy Couprie
2019-05-09Remove ValueWithKey structGuillem Nieto
While using this library, I end up having lifetime issues with `Config::get`. I've seen that current implementation forces the calleer to match `key` lifetime to the output of the function. My use case is, under some circumstances, return a suffixed version of the config key. Something similar to: ``` if some_condition == true { let key_name = format!("{}_suffix", key); self.config.get(&key_name) } else { self.config.get(key) } ``` This code is noy compiling for me due to conflicting lifetimes. To avoid this, I've started looking to the code and I've found that `key` needed this lifetime because of `ValueWithKey`. The purpouse of this struct seems to be add more information to the errors that are returned to the user. To mitigate this lifetime coupling I've: - Mapped the error on `Config::get` to include the originating key of the current error - Remove all the code related with `ValueWithKey`
2019-05-09Remove try_defaults_from and set_defaults (for now) as '#[serde(default)]' ↵Ryan Leckey
works thanks to #106
2019-04-08Add missing doctyranron
2019-04-08Fix annoying 'invalid type: unit value, expected struct Settings' errortyranron
2019-04-08Bootstrap solutiontyranron
2019-01-03Re-export file source type markers (fixes #91)Ryan Leckey
2018-12-30Tracking a path where an error happens during deserializationMichal 'vorner' Vaner
Related to #83, but doesn't solve that specific problem :-(. That specific error message ("missing field") comes from somewhere else than this library.
2018-12-30Deserializing: Simplify the MapAccess thingMichal 'vorner' Vaner
2018-11-10support reading enums from configEugeen Sablin
2018-09-25Use a build config on Environment instead of a feature flag for #78Ryan Leckey
2018-09-26Treat empty environment variables as unsetPhil Booth
2018-07-02Update readme/changelog for 0.9Ryan Leckey
2018-07-02Run rustfmt (nightly)Ryan Leckey
2018-07-02Merge branch 'feature/ini' of https://github.com/woodgear/config-rsRyan Leckey
2018-07-02Fix test failures from upgrade to nom 4Ryan Leckey
2018-07-02Merge branch 'master' of https://github.com/Geal/config-rsRyan Leckey
2018-07-02Merge branch 'master' of https://github.com/limbo-rs/config-rsRyan Leckey
2018-06-25option rust-inisan.dai
2018-06-15fix doc testsaber.wu
2018-06-15support inisaber.wu
2018-04-09Mark Value docs as textAleksey Ivanov
2018-04-09[Close #70] Support newtype struct deserializationAleksey Ivanov
2018-04-08Add ConfigSerializerXX
2018-04-08Fix initialy set arr pathXX
2018-04-06Add config serialize abilityXX
2018-03-12Merge pull request #59 from ChriFo/fix/envRyan Leckey
Adjust environment variable handling
2018-02-17update to nom 4Geoffroy Couprie
2018-01-29add default prefix separatorChristian Fochler
- no need to add '_' to the prefix
2018-01-28make separator optionalChristian Fochler
2018-01-28Revert "remove unnecessary env key manipulation"Christian Fochler
This reverts commit 36b477df0f9bda4d153b674b3007ee087e44d67f.
2018-01-26Merge pull request #54 from cmyr/partialeq-valueRyan Leckey
Add derive(PartialEq) for Value, ValueType