Skip to content

Add examples on how to use the ConfigBuilder #228

@AdheipSingh

Description

@AdheipSingh

Thanks for this library.
I am new to rust and was playing around with the examples to get started.

Just encountered this warning on compilation

warning: use of deprecated associated function `config::Config::merge`: please use 'ConfigBuilder' instead
 --> src/main.rs:7:10
  |
7 |         .merge(config::File::with_name("Settings")).unwrap()
  |          ^^^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `config::Config::merge`: please use 'ConfigBuilder' instead
  --> src/main.rs:10:10
   |
10 |         .merge(config::Environment::with_prefix("APP")).unwrap();
   |          ^^^^^

warning: 2 warnings emitted

    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/simple`
{"priority": "32", "debug": "false", "key": "189rjfadoisfj8923fjio"}

Just wondering if the example can be updated to configBuilder. An explanation on the usage of configbuilder vs merge will helpful too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions