syncstorage-rs
syncstorage-rs copied to clipboard
Cleanup default config settings.
With this change to config-rs, a bug has been fixed that was preventing us from using the Default implementation for the Settings struct. We can remove most or all of the calls to set_default in Settings::with_env_and_config_file in favor of the defaults set in the Default implementation.
This is a pretty easy cleanup to accomplish, by:
- adding
#[serde(default)]toSettings, which makes theDefaultimpl be utilized which lets us.. - kill the many
set_defaultcalls that duplicate those defaults inSettings::with_env_and_config_file - additionally, when removing the
set_defaultcalls, spot check their values -- ensure theDefaultimplementation's values match those (just in case any have gotten out of sync over time)
As an example see how this was done for contile
This will be completed as part of the crate reorganization work