summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-10-02Move test that requires "json5" feature to json5 testsfeature-gates-testsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Revert "Reimplement with toml as test format, as module tests only with ↵Matthias Beyer
"toml" feature enabled" This reverts commit de64ae97b9e39b97f6d8d5e9273fe77ae34c8810.
2021-10-02Include doc example only if "json" is enabledMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Reimplement with toml as test format, as module tests only with "toml" ↵Matthias Beyer
feature enabled Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Reimplement example, compile only with "json" feature enabledMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Rewrite test with TOML, as module is only compiled with "toml" feature enabledMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Add feature gates to test functionsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Add missing import in testsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Add workflow step for running testsuite of only one featureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Merge pull request #237 from matthiasbeyer/fix-nightly-clippyMatthias Beyer
Fix nightly clippy issues
2021-10-02Fix clippy: variable does not need to be passed as &mutMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Fix clippy: Remove unused field: AsyncConfigBuilder::defaultsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Fix clippy: Remove unused field: AsyncConfigBuilder::overridesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Fix clippy: Remove unused field: AsyncConfigBuilder::sourcesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Fix clippy: Remove Default impl for Environment, derive itMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-10-02Merge pull request #225 from matthiasbeyer/test-wrapping-integersMatthias Beyer
Add tests for wrapping integers
2021-10-02Merge pull request #227 from matthiasbeyer/test-weird-keysMatthias Beyer
Add tests for weird keys
2021-09-09Add tests for weird keysMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-08-23Add tests for wrapping integersMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-08-21Merge pull request #222 from matthiasbeyer/fix-221Matthias Beyer
Make sure examples build
2021-08-21Fix: Import HashMap instead of MapMatthias Beyer
I didn't catch that when merging PR #217. Fixes: be82af2 ("Rename MapImpl to Map") Fixes: 0d3a5c3 ("Merge pull request #217 from dlo9/master") Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-08-21Fix: Import HashMap instead of MapMatthias Beyer
I didn't catch that when merging PR #217. Fixes: be82af2 ("Rename MapImpl to Map") Fixes: 0d3a5c3 ("Merge pull request #217 from dlo9/master") Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-08-21Fix: Import HashMap instead of MapMatthias Beyer
I didn't catch that when merging PR #217. CI should have catched it, but we actually never ran CI for examples. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Fixes: be82af2 ("Rename MapImpl to Map") Fixes: 0d3a5c3 ("Merge pull request #217 from dlo9/master")
2021-08-21Add CI job for checking examplesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-08-20Merge pull request #217 from dlo9/masterMatthias Beyer
Preserve map ordering
2021-08-15Test with all features enabled in CIDavid Orchard
2021-08-15Rename MapImpl to MapDavid Orchard
2021-08-15Remove unnecessary uses for feature/mapDavid Orchard
2021-08-15Switch from LinkedHashMap to IndexMapDavid Orchard
2021-08-15Move order preservation under a feature gateDavid Orchard
2021-08-15Disable map order preservation for hjsonDavid Orchard
2021-08-15Preserve map order when mergingDavid Orchard
2021-08-15Enable dependency features for map order preservationDavid Orchard
2021-08-15Use LinkedHashMap in place of HashMapDavid Orchard
2021-08-15Create test cases to demonstrate lossy map orderDavid Orchard
2021-07-10Merge pull request #207 from szarykott/async_sourceMatthias Beyer
Add AsyncSource with tests, docs and examples
2021-07-03Simplify example implMatthias Beyer
With this simplification, we save a bit of code on one side, but also showcase that errors from custom AsyncSource implementations are possible because the ConfigError type provides a variant for it. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de>
2021-07-03Fix clippy: Use to_string() instead of clone()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-07-03Fix clippy: Use &str instead of &String as argumentMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-07-03Bump MSRV to 1.46.0Matthias Beyer
Because one of our dependencies (namingly `socket2`) uses match in a const fn, which is stabilized in rust 1.46.0, we bump to this version as MSRV for this crate. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de>
2021-07-03On 1.44.0, only test testsMatthias Beyer
This is required because the examples pull in the "reqwest" crate, which depends on "socket2" and this crate fails to build if the "const fn" feature is not present (which wasn't on 1.44.0). Hence, we only run the tests in the 1.44.0 job, but do not compile the examples. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-07-03Add test for async builderRadosław Kot
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
2021-07-03Add example implementation using async sourceRadosław Kot
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-26Reimplement the Config building mechanismRadosław Kot
This patch rewrites the Config building mechanism using special objects for tracking the config building state. Transitions between states are done on the fly as required. This is required so that the async sources can be stored inside the configuration building objects, while keeping out the expenses in the non-async case, so a user of the crate has only to pay for what they are using (no async means no overhead for that). Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-26Add AsyncSource traitRadosław Kot
This patch adds the AsyncSource trait, the interface for providing async source functionality for this crate. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Reviewed-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-26Add doc to fnMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-26Refactor: Import Result and use it instead of specifying full type pathMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-26Refactor: Extract setting of cache to helper fnMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2021-06-11Merge pull request #209 from eduardocanellas/optimize-envMatthias Beyer
refactor(env): optimize and reduce allocations
2021-06-09refactor(env): optimize and reduce allocationsEduardo Canellas