From 6845ed9ad768d22d74ee74310e42883136633c20 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 7 Nov 2019 10:56:50 -0700 Subject: [PATCH] Fix crash when loading if the installer was updated from an older version --- src/installer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/installer.rs b/src/installer.rs index 2c6256b..c758c48 100644 --- a/src/installer.rs +++ b/src/installer.rs @@ -54,7 +54,7 @@ pub enum InstallMessage { EOF, } -#[derive(Serialize, Deserialize, Clone)] +#[derive(Serialize, Deserialize, Default, Clone)] pub struct Credentials { #[serde(default)] pub username: String, @@ -67,6 +67,7 @@ pub struct Credentials { pub struct InstallationDatabase { pub packages: Vec, pub shortcuts: Vec, + #[serde(default)] pub credentials: Credentials, }