[Refactor] derive(Default) for Config
@@ -37,7 +37,7 @@ pub enum Error {
Toml(#[from] toml::de::Error),
}
-#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
+#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
pub struct Config {
pub auth_token: Option<String>,
pub origin: Option<Origin>,
@@ -52,15 +52,6 @@ impl Config {
}
}
-impl Default for Config {
- fn default() -> Self {
- Config { auth_token: None,
- origin: None,
- ctl_secret: None,
- bldr_url: None, }
- }
-}
-
pub fn load() -> std::result::Result<Config, Error> {
if CLI_CONFIG_PATH.exists() {
debug!("Loading CLI config from {}", CLI_CONFIG_PATH.display());
