From 6576e2f3f9446f1905244051d4a55938c1ebec5c Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sat, 26 Aug 2023 11:55:04 -0700 Subject: [PATCH] Derive Default for Config --- status_cloud/src/main.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/status_cloud/src/main.rs b/status_cloud/src/main.rs index dea5526..a73f297 100644 --- a/status_cloud/src/main.rs +++ b/status_cloud/src/main.rs @@ -127,7 +127,7 @@ struct NoteUpdate { content: String, } -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Default)] struct Config { user: String, pswd: String, @@ -135,17 +135,6 @@ struct Config { server_url: String, } -impl Default for Config { - fn default() -> Self { - Self { - user: "".to_string(), - pswd: "".to_string(), - note_id: "".to_string(), - server_url: "".to_string(), - } - } -} - #[derive(Parser, Debug)] #[command(author, version, about, long_about=None)] struct CliArgs {