config-rs icon indicating copy to clipboard operation
config-rs copied to clipboard

Examples use deprecated methods

Open danieleades opened this issue 3 years ago • 7 comments

a number of examples use deprecated code.

The associated lints are either addressed or silenced in #262, but the remaining examples should be updated and the lints unsilenced in a following PR.

It's not clear to me how the builder API can be used to support the use-cases in those examples...

danieleades avatar Dec 29 '21 11:12 danieleades

Same here, I'm trying to figure out how to use the builder API

firegloves avatar Dec 30 '21 21:12 firegloves

master != 0.11.0.

You should check the example docs in the branch for whatever version you are currently using e.g https://github.com/mehcode/config-rs/blob/0.11.0/examples

M-Porter avatar Jan 04 '22 19:01 M-Porter

master != 0.11.0.

You should check the example docs in the branch for whatever version you are currently using e.g https://github.com/mehcode/config-rs/blob/0.11.0/examples

i'm not sure what you mean?

the examples in master use methods which are deprecated in master.

danieleades avatar Jan 04 '22 20:01 danieleades

I guess it is an unreleased feature on master

hbprotoss avatar Jan 17 '22 09:01 hbprotoss

I guess it is an unreleased feature on master

It's the opposite. It's a deprecated feature on master.

danieleades avatar Jan 17 '22 09:01 danieleades

https://github.com/mehcode/config-rs/blob/master/examples/hierarchical-env/settings.rs#L49

no function or associated item named builder found for struct config::Config in the current scope function or associated item not found in config::ConfigrustcE0599

How would that example look like with the latest version?

gitmalong avatar Feb 07 '22 05:02 gitmalong

https://github.com/mehcode/config-rs/blob/817b37807572418f48e3d660e3931d265e32ab28/examples/hierarchical-env/src/settings.rs

matthiasbeyer avatar Feb 07 '22 07:02 matthiasbeyer