Open kriomant opened 8 years ago
Can you check out if the following change would work for you?
https://github.com/bfil/toml-config/commit/1d75b0db450650caee6523ee895b5a8bb78fa1dc
It exposes a decode()
method and allows the following: ConfigFactory::decode(toml_table)
If that works for you I can update the docs and release a new version.
decode
consumes toml_table
parameter. It seems it is not needed.
It is used, it overrides the defaults from the config structure with the toml_table
value, I'm not sure if that is what you mean?
It is consuming which is not needed, not the parameter itself. You receive toml_table
parameter by value while It seems reference will be enough.
Sometimes parsed toml::Value is already available and it is needed initialize config from it.