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

Cleanup default config settings.

Open tublitzed opened this issue 6 years ago • 2 comments

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.

tublitzed avatar Oct 08 '19 15:10 tublitzed

This is a pretty easy cleanup to accomplish, by:

  • adding #[serde(default)] to Settings, which makes the Default impl be utilized which lets us..
  • kill the many set_default calls that duplicate those defaults in Settings::with_env_and_config_file
  • additionally, when removing the set_default calls, spot check their values -- ensure the Default implementation'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

pjenvey avatar Mar 04 '22 00:03 pjenvey

JIRA

ethowitz avatar Mar 15 '22 16:03 ethowitz

This will be completed as part of the crate reorganization work

ethowitz avatar Sep 26 '22 14:09 ethowitz